WordPress plugin intelligence profile

WP Shortcode Shield

Allows posts and pages to easily document WordPress shortcodes without the shortcode being expanded.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.4
Current version1.1.0
WordPress coverageTested up to WordPress 3.4
Minimum stackWP 3.4 · PHP —
Directory statusactive
Last directory update12 Nov 201213y ago
Active installations10Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 1 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records WP Shortcode Shield version 1.1.0 as active, updated 13y ago and tested up to WordPress 3.4.

Overview

About this plugin

This plugin allows you to refer to a WordPress shortcode within the content of posts and pages without that shortcode being automagically expanded by WordPress. The plugin takes advantage of the fact that the WordPress ShortCode API does not support nested shortcodes to allow this plugin’s shortcode to wrap the shortcode being documented.

>

The shortcode parser uses a single pass on the post content. This means that if

the $content parameter of a shortcode handler contains another shortcode, it won’t

be parsed

The plugin supports both the self closing [shortcode] and enclosing [shortcode]content[/shortcode] forms and supports a short form name of the shortcode, [wp_scs] as well as the more verbose [wp_shortcode_shield] form. For the sake of brevity, the remainder of this documentation will use the [wp_scs] short form name.

If using the self-closing form of the shortcode, you need to supply the name of the shortcode you are documenting using the code attribute but without using the enclosing [ and ] characters. This is because when parsing shortcodes, WordPress looks for the first occurrence of the ‘]’ character to terminate the shortcode. As a result of this, usage such as

[wp_scs code="[another-shortcode-name]"]

… WordPress will use the ‘]’ character inside the code attribute to try and terminate the shortcode name, which is not what is desired. Instead, the plugin automagically adds the terminating ‘[‘ and ‘]’ characters to the plugin’s output, so that usage such as

[wp_scs code="another-shortcode-name"]

… will display [another-shortcode-name] in your post’s of page’s content.

If you are using the enclosing form of the shortcode, you can either supply the shortcode to be documented with or without enclosing ‘[‘ and ‘]’ characters; if they are omitted, the plugin will add them for you, so that usage such as

[wp_scs][another-shortcode-name][/wp_scs]

… and

[wp_scs]another-shortcode-name[/wp_scs]

… will display the same results, namely [another-shortcode-name].

Finally a note of caution, you cannot mix the enclosing and self closing form of the plugin’s shortcode within the same post or page; this is not a limitation of the plugin, but the way in which WordPress implements the ShortCode API …

>

The parser does not handle mixing of enclosing and non-enclosing forms of the same

shortcode as you would want it to. For example, if you have:

[myshortcode example='non-enclosing' /] non-enclosed content [myshortcode] enclosed content

[/myshortcode]

Instead of being treated as two shortcodes separated by the text ” non-enclosed content “,

the parser treats this as a single shortcode enclosing ” non-enclosed content [myshortcode]

enclosed content”.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • documentation
  • page
  • post
  • shortcode
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.4

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 3.4.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.4
Minimum requirementsWordPress 3.4 · PHP not listed
Update activity12 Nov 201213y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.