From 6216aa2331e35653066b7ce4e07819f93049050b Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 29 Jun 2014 21:29:17 +0000 Subject: [PATCH] Add documentation for the default playlist shortcode attributes in `wp_playlist_shortcode()`. Props taylorde. Fixes #28678. Built from https://develop.svn.wordpress.org/trunk@28901 git-svn-id: http://core.svn.wordpress.org/trunk@28700 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index 2edfc1ab9d..f0e77724ed 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1161,7 +1161,30 @@ add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' ); * * @since 3.9.0 * - * @param array $attr Playlist shortcode attributes. + * @param array $attr { + * Array of default playlist attributes. + * + * @type string $type Type of playlist to display. Accepts 'audio' or 'video'. Default 'audio'. + * @type string $order Designates ascending or descending order of items in the playlist. + * Accepts 'ASC', 'DESC', or 'RAND'. Default 'ASC'. + * @type string $orderby Any column, or columns, to sort the playlist. If $ids are + * passed, this defaults to the order of the $ids array ('post__in'). + * Otherwise default is 'menu_order ID'. + * @type int $id If an explicit $ids array is not present, this parameter + * will determine which attachments are used for the playlist. + * Default is the current post ID. + * @type array $ids Create a playlist out of these explicit attachment IDs. If empty, + * a playlist will be created from all $type attachments of $id. + * Default empty. + * @type array $exclude List of specific attachment IDs to exclude from the playlist. Default empty. + * @type string $style Playlist style to use. Accepts 'light' or 'dark'. Default 'light'. + * @type bool $tracklist Whether to show or hide the playlist. Default true. + * @type bool $tracknumbers Whether to show or hide the numbers next to entries in the playlist. Default true. + * @type bool $images Show or hide the video or audio thumbnail (Featured Image/post + * thumbnail). Default true. + * @type bool $artists Whether to show or hide artist name in the playlist. Default true. + * } + * * @return string Playlist output. Empty string if the passed type is unsupported. */ function wp_playlist_shortcode( $attr ) {