[wp-hackers] Shortcodes and formatting

Andy Skelton skeltoac at gmail.com
Tue Apr 1 16:42:11 GMT 2008


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.

Andy


More information about the wp-hackers mailing list