[wp-trac] [WordPress Trac] #29029: get_shortcodes() - retrieve the shortcode instances from content

WordPress Trac noreply at wordpress.org
Tue Oct 28 19:04:14 UTC 2014


#29029: get_shortcodes() - retrieve the shortcode instances from content
-------------------------+------------------------------
 Reporter:  ericlewis    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Shortcodes   |     Version:  4.0
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+------------------------------

Comment (by aaroncampbell):

 Hey Eric, I'm not really sure I see the need here. `get_shortcode_regex()`
 gives you 99% of what you need to do this, and while the helper function
 is nice, I'm not sure it's really needed. I'll think a little more on
 that.

 Having said that, from a technical standpoint, your patch should at least
 check that the tag names passed to `get_shortcode_regex()` exist in the
 keys of `$shortcode_tags`. Core uses `array_intersect()` to do this in
 several other places (list tables and query come to mind, but I'm sure
 it's used in plenty of other places too).

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


More information about the wp-trac mailing list