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

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 8 05:34:32 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 aaroncampbell):

 A couple thoughts:
 1. It seems like a preview is "a look at what this will really look like"
 so I think it should be the same as what a user would see after it's
 published.
 1. The patch doesn't work.  Each time a shortocde is added the option is
 updated to the CURRENT list of shortcodes, which means anything that USED
 to exist but no longer does isn't in the option.  I used the following
 code added to functions.php, added [testshortcode] to a post, viewed it,
 removed the code below, loaded the post again and it worked, then loaded
 the post again and the shortcode shows again (so it only works for one
 page load).

 {{{
 function testshortcode( $attr, $content = '' ) {
         return "Shortcode is working";
 }
 add_shortcode( 'testshortcode', 'testshortcode' );
 }}}

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


More information about the wp-trac mailing list