[wp-hackers] Shortcodes and formatting

Andrew Ozz admin at laptoptips.ca
Tue Apr 1 22:00:41 GMT 2008


Andy Skelton wrote:
> On Mon, Mar 31, 2008 at 12:46 PM, Duane Storey <duanestorey at gmail.com> wrote:
>> The only thing I don't like about plugins that use shortcodes is that
>>  if you disable the plugin, you're left with a bunch of markup that no
>>  longer renders.
> 
> Ditto. Proposal:
> 
> On plugin deactivation, call null_shortcode($tag). This adds $tag to
> an array stored in options table.
> 
> On add_shortcode, check for $tag in null_shortcode array. If found,
> remove it and update_option.
> 
> On do_shortcode, replace tags in null_shortcode array with empty string.

That will work well except when the content is exported from one blog 
and imported in another/new installation. The array with the old 
shortcodes wouldn't be in the new db.

I still think that the format for shortcodes should be hidden in the 
browser by default, like the <!--more--> and <!--nextpage--> tags that 
have been working very well for some years now.

There are several options to show any type of shortcodes in TinyMCE, it 
supports custom tags, or the "wordpress" plugin can be extended to 
handle them similar to the <!--more--> tag, or we can modify and add the 
"bbcode" plugin for TinyMCE, etc.



More information about the wp-hackers mailing list