Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24309 closed enhancement (fixed)

Add filters for get_post_galleries() and get_post_gallery()

Reported by: alexkingorg's profile alexkingorg Owned by: nacin's profile nacin
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.6
Component: Gallery Keywords: has-patch needs-refresh
Focuses: Cc:


As post format implementations were not tightly defined in the past, there are a variety of gallery implementations in the wild. For example, not all implementations included the use of the [gallery] shortcode.

Adding in a couple of hooks will likely allow for backward compatibility to those implementations.

Attachments (1)

gallery-filters.diff (1.2 KB) - added by alexkingorg 11 years ago.
add filters to Gallery post format functions

Download all attachments as: .zip

Change History (8)

11 years ago

add filters to Gallery post format functions

#1 @SergeyBiryukov
11 years ago

  • Milestone changed from Awaiting Review to 3.6

#2 @DrewAPicture
11 years ago

  • Keywords needs-refresh added

#3 @ocean90
11 years ago

  • Type changed from defect (bug) to enhancement

#4 @nacin
11 years ago

As said in IRC:

  • as long as passed args make sense, good for commit from me.
  • but: it does make me ask why get_post_gallery() does not call get_post_galleries().
  • if there is a filter in the latter, then the former really needs to wrap the latter.

Going to look at this in concert with #24202 and a general audit of these functions.

#5 @alexkingorg
11 years ago

:does a happy little dance:

#6 @helen
11 years ago

Also, that get_content_galleries() only takes 3 args.

#7 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 24682:

Simplify and reduce the new media/content extraction functions.

The URL extraction function is now get_url_in_content(). For more, see #24202.

Also adds filters to get_post_galleries() and get_post_gallery(). fixes #24309.

Note: See TracTickets for help on using tickets.