[wp-trac] [WordPress Trac] #31151: Pass $instance variable to post_gallery, post_playlist filters
WordPress Trac
noreply at wordpress.org
Wed Jan 28 05:00:01 UTC 2015
#31151: Pass $instance variable to post_gallery, post_playlist filters
-------------------------+-----------------------------
Reporter: justincwatt | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.1
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
`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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31151>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list