Ticket #6954 (closed defect: invalid)

Opened 7 months ago

Last modified 7 months ago

Parameter not passed in 'post_gallery' filter

Reported by: scribu Assigned to: guillep2k
Priority: normal Milestone:
Component: General Version:
Severity: normal Keywords: gallery, filters
Cc: ionfish

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

05/11/08 01:31:25 changed by DD32

  • status changed from new to closed.
  • version deleted.
  • resolution set to invalid.
  • milestone 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.