Support » Plugins » apply_filters bug in gallery_shortcode?

  • In function gallery_shortcode() in wp_includes/media.php, in version 2.9.2, apply_filters is called on line 677 like this:

    $output = apply_filters('post_gallery', '', $attr);

    The result is that a post-gallery filter (registered in my case by “add_filter( ‘post_gallery’, ‘sandbox_gallery’, $attr );”) does not receive the $attr array. Things work again when I change line 677 to:

    $output = apply_filters('post_gallery', $attr);

    This is also the correct syntax according to the function reference. So I guess my question is, is this actually a bug, or is there an issue with my implementation of post_gallery?


  • The topic ‘apply_filters bug in gallery_shortcode?’ is closed to new replies.