Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#6954 closed defect (bug) (invalid)

Parameter not passed in 'post_gallery' filter

Reported by: scribu's profile scribu Owned by: guillep2k's profile guillep2k
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: gallery, filters
Focuses: Cc:

Description

In gallery_shortcode() the filter 'post_gallery' is called like this:

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

when it should be like this:

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

Change History (1)

#1 @DD32
17 years ago

  • Milestone 2.5.2 deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version 2.5.1 deleted

The code is correct as-is.

The post_gallery filter is designed to allow another plugin to take over the gallery handling, A empty string is passed in, And if any content is returned, then its assumed that is the gallery.

$attrs is simply passed along to the filter to allow it to receive the params, It cant change those for the rest of the function.

There does not appear to be a filter to allow you to modify the default Attributes from a plugin if that is what you were after?

I'm closing this as invalid due to the original reason for the ticket.

Note: See TracTickets for help on using tickets.