Hide Broken Shortcodes

plugin banner

Version: 1.5

Prevent broken shortcodes from appearing in posts and pages.

Author:Scott Reilly (profile at wordpress.org)
WordPress version required:2.5
WordPress version tested:5.8.1
Plugin version:1.9.4
Added to WordPress repository:05-01-2010
Last updated:10-10-2021
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:90
Rated by:10
Plugin URI:https://coffee2code.com/wp-plugins/hide-broke...
Total downloads:23 214
Active installs:800+
plugin download
Click to start download

By default in WordPress, if the plugin that provides the functionality to handle any given shortcode is disabled, or if a shortcode is improperly defined in the content (such as with a typo), then the shortcode in question will appear on the site in its entirety, unprocessed by WordPress. At best this reveals unsightly code-like text to visitors and at worst can potentially expose information not intended to be seen by visitors.

This plugin prevents unhandled shortcodes from appearing in the content of a post or page. If the shortcode is of the self-closing variety, then the shortcode tag and its attributes are not displayed and nothing is shown in their place. If the shortcode is of the enclosing variety (an opening and closing tag bookend some text or markup), then the text that is being enclosed will be shown, but the shortcode tag and attributes that surround the text will not be displayed.

See the Filters section for more customization tips.

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

Developer Documentation

Developer documentation can be found in DEVELOPER-DOCS.md. That documentation covers the hooks provided by the plugin.

As an overview, these are the hooks provided by the plugin:

  • hide_broken_shortcode : Customizes what, if anything, gets displayed when a broken shortcode is encountered.
  • hide_broken_shortcodes_filters : Customizes what filters to hook to find text with potential broken shortcodes.

FAQ
ChangeLog