WordPress.org

Ready to get started?Download WordPress

Forums

apply_filters bug in gallery_shortcode? (1 post)

  1. seanwm
    Member
    Posted 4 years ago #

    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?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic