Opened 10 years ago
Closed 10 years ago
#31151 closed enhancement (fixed)
Pass $instance variable to post_gallery, post_playlist filters
Reported by: | justincwatt | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
gallery_shortcode()
and wp_playlist_shortcode()
keep track of the number of times they're called with a static variable, $instance
. This variable is important so that content (e.g. CSS) can be included only on the first function call, or so that unique IDs can be generated for HTML tags.
The problem is that this instance variable is not made available to their respective filters, post_gallery
and post_playlist
, unlike their shortcode siblings, wp_audio_shortcode()
and wp_video_shortcode()
, both of which pass the instance variable to their filters. Which means that any plugins seeking to adapt the behavior of these shortcodes do not have access to the same data as core.
Attachments (2)
Change History (8)
Note: See
TracTickets for help on using
tickets.
Passing $instance variable to post_gallery and post_playlist filters