WordPress.org

Make WordPress Core

Changeset 31304


Ignore:
Timestamp:
01/30/2015 04:01:25 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Pass the current shortcode instance ID to post_gallery and post_playlist filters.

props justincwatt.
fixes #31151.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r31239 r31304  
    942942     * @see gallery_shortcode()
    943943     *
    944      * @param string $output The gallery output. Default empty.
    945      * @param array  $attr   Attributes of the gallery shortcode.
    946      */
    947     $output = apply_filters( 'post_gallery', '', $attr );
     944     * @param string $output   The gallery output. Default empty.
     945     * @param array  $attr     Attributes of the gallery shortcode.
     946     * @param int    $instance Unique numeric ID of this gallery shortcode instance.
     947     */
     948    $output = apply_filters( 'post_gallery', '', $attr, $instance );
    948949    if ( $output != '' ) {
    949950        return $output;
     
    12151216     * @since 3.9.0
    12161217     *
    1217      * @param string $output Playlist output. Default empty.
    1218      * @param array  $attr   An array of shortcode attributes.
    1219      */
    1220     $output = apply_filters( 'post_playlist', '', $attr );
     1218     * @param string $output   Playlist output. Default empty.
     1219     * @param array  $attr     An array of shortcode attributes.
     1220     * @param int    $instance Unique numeric ID of this playlist shortcode instance.
     1221     */
     1222    $output = apply_filters( 'post_playlist', '', $attr, $instance );
    12211223    if ( $output != '' ) {
    12221224        return $output;
Note: See TracChangeset for help on using the changeset viewer.