[wp-trac] [WordPress Trac] #32790: Filter for do_shortcode_tag()

WordPress Trac noreply at wordpress.org
Thu Sep 10 12:06:41 UTC 2015


#32790: Filter for do_shortcode_tag()
-----------------------------+------------------------------
 Reporter:  danielbachhuber  |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Shortcodes       |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by bobbingwide):

 I had similar requirements.
 1. Where I wanted to do some generic processing based on the values of
 shortcode attributes.
 2. Where I wanted to post process the shortcode output: to support
 pagination
 3. And whatever I need to do to appease shortcake when I enqueue jQuery
 and CSS

 Having already implemented all my shortcodes using the same handler
 it was easy for me to add the new filter functions for 1. and 2.
 I don't know how to do 3. yet. :-)

 See http://www.oik-plugins.com/oik_api/bw_shortcode_event/

 You may also want to look at #32445:3
 where Nacin proposes rewriting the shortcode API to use hooks under the
 hood.

 Perhaps if do_shortcode_tag() or do_shortcode() were pluggable then we'd
 be able to do all sorts of interesting things.

 Maybe the function to invoke in the
 preg_replace_callback(,do_shortcode_tag, ) calls could be determined using
 a filter.

 Let's hope this requirement gets considered in the shortcode roadmap.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32790#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list