Categories
Package/plugin/module WordPress

Hide Broken Shortcodes v1.0 (new)

I’d like to announce the first official release of the Hide Broken Shortcodes plugin (v1.0) for WordPress.

Prevent broken shortcodes from appearing in posts and pages.

For more details, instructions, and the download link, visit the plugin’s official homepage at :
coffee2code.com/wp-plugins/hide-broken-shortcodes.

This is my 51st plugin release.

Comments welcome on this post for this version of the plugin. Comments will be closed once this release has been superseded by another.

5 replies on “Hide Broken Shortcodes v1.0 (new)”

Thanks for the wonderful plugin. But I was wondering if a simple option would be provided to the blog user so that he can decide that for shortcodes of enclosing variety, we want the text in between to display or wipe that out too?

I am using a blog where I work with youtube embeds, and if at a place shortcode does not work, your plugin still shows the youtube url which I want to hide even if the shortcode is of enclosing type!

Good idea. I’ll add that as an option in the next release of the plugin, which I’m hoping will follow after I’ve finished my push to release a bunch of new plugins. In the meantime, if you need the functionality and are willing to modify the plugin’s code, do so and edit line 79. Change it from this:

return ( isset($m[4]) ? $m[4] : '' );

to this:

return ''; // that's 2 single-quote characters

It’ll then hide everything related to a broken shortcode, including any enclosed text.

Hi Scott,
Great plugin. I have used a couple of shortcode plugins that also work in widgets in the side bar. It would be great to add your plugin’s functionality to that area too.

If you add the following after line 61 (where you add your filter), you have it covered:

add_filter('widget_text', array(&$this, 'do_shortcode'), 12);

Hope that helps,
Mike

Hi Mike,

Thanks! Great idea to also apply the functionality of the plugin to widget text as well. Something I should also consider doing for my other content manipulation plugins. I’ll include the code in a soonish update to the plugin. Thanks again!

Comments are closed.