[wp-trac] [WordPress Trac] #18558: Handling of dormant shortcodes is inelegant

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 8 07:12:25 UTC 2011


#18558: Handling of dormant shortcodes is inelegant
-------------------------+------------------------------
 Reporter:  markjaquith  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Shortcodes   |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by trevogre):

 That should be better. I also added the ability to register a default
 shortcode. With register_default_shortcode($func). That may be a bad name
 as it's the default for unregistered shortcodes.

 I used the suggestion to register the used shortcodes at shutdown.

 I didn't put in anything to fire on init because the $shortcode_tags is
 initialized with an array on load of the shortcodes.php file currently. So
 I thought that the option needed to be loaded at the earliest point
 possible so that it would happen before all add_shortcode calls.

 It would be easy to wrap that in init if that makes more sense but I don't
 know the answer to that.

 I'm not sure about the comment that it only works for one page load. I
 don't see that, but I'm going to poke at it some more and see if I can't
 make that happen.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18558#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list