From fa86f3ef9cdc01954269fea4870e334bef6b5fcd Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 30 Jan 2015 16:02:21 +0000 Subject: [PATCH] Pass the current shortcode instance ID to `post_gallery` and `post_playlist` filters. props justincwatt. fixes #31151. Built from https://develop.svn.wordpress.org/trunk@31304 git-svn-id: http://core.svn.wordpress.org/trunk@31285 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 14 ++++++++------ wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index 506c86c5ee..e929ad47ea 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -941,10 +941,11 @@ function gallery_shortcode( $attr ) { * * @see gallery_shortcode() * - * @param string $output The gallery output. Default empty. - * @param array $attr Attributes of the gallery shortcode. + * @param string $output The gallery output. Default empty. + * @param array $attr Attributes of the gallery shortcode. + * @param int $instance Unique numeric ID of this gallery shortcode instance. */ - $output = apply_filters( 'post_gallery', '', $attr ); + $output = apply_filters( 'post_gallery', '', $attr, $instance ); if ( $output != '' ) { return $output; } @@ -1214,10 +1215,11 @@ function wp_playlist_shortcode( $attr ) { * * @since 3.9.0 * - * @param string $output Playlist output. Default empty. - * @param array $attr An array of shortcode attributes. + * @param string $output Playlist output. Default empty. + * @param array $attr An array of shortcode attributes. + * @param int $instance Unique numeric ID of this playlist shortcode instance. */ - $output = apply_filters( 'post_playlist', '', $attr ); + $output = apply_filters( 'post_playlist', '', $attr, $instance ); if ( $output != '' ) { return $output; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 2a56a5aad0..548c081635 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31303'; +$wp_version = '4.2-alpha-31304'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.