Pass the current shortcode instance ID to `post_gallery` and `post_playlist` filters.
props justincwatt. fixes #31151. git-svn-id: https://develop.svn.wordpress.org/trunk@31304 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e725b36d1e
commit
45b0513c1b
|
@ -943,8 +943,9 @@ function gallery_shortcode( $attr ) {
|
|||
*
|
||||
* @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;
|
||||
}
|
||||
|
@ -1216,8 +1217,9 @@ function wp_playlist_shortcode( $attr ) {
|
|||
*
|
||||
* @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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue