[wp-trac] [WordPress Trac] #25435: Introduce alternative to do_shortcode( '[shortcode]' )

WordPress Trac noreply at wordpress.org
Sun Sep 6 03:59:11 UTC 2015


#25435: Introduce alternative to do_shortcode( '[shortcode]' )
-----------------------------+-----------------------------
 Reporter:  jdgrimes         |       Owner:
     Type:  feature request  |      Status:  reopened
 Priority:  normal           |   Milestone:  Future Release
Component:  Shortcodes       |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+-----------------------------

Comment (by nickciske):

 +1

 Since this was in "''600 entries in over 270 plugins''"* back in 2013 (and
 is almost certainly worse now) it would seem like a better way forward
 would be to tweak {{{do_shortcode()}}} to detect the case of a single
 shortcode being called, and if so, run {{{do_shortcode_tag()}}} directly.
 That avoids the overhead of scanning the entire {{{$shortcode_tags}}}
 array without adding a new function or requiring hundreds of plugins to be
 updated.

 I know shortcodes in general are up for a rebuild, but this seems like
 some very low hanging fruit that could improve performance across hundreds
 of plugins (especially for sites with large numbers of registered
 shortcodes) in the meantime.

 * https://kovshenin.com/2013/dont-do_shortcode/

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


More information about the wp-trac mailing list