Shortcodes In Use

0

Can’t recall where, or if, you’ve used a certain shortcode? Want to remove a plugin and unsure if it provides shortcodes or whether you’re using them? Don’t know what shortcode

Version
Last updated
Active installations
WordPress Version
Tested up to
Rating
Total ratings
Tag
This plugin is outdated and might not be supported anymore.

Description

  • Can’t recall where, or if, you’ve used a certain shortcode?
  • Want to remove a plugin and unsure if it provides shortcodes or whether you’re using them?
  • Don’t know what shortcodes come with WordPress?
  • Found one unrecognised shortcode but unsure where there might be others?
  • Need to swap out a theme and don’t know if it has shortcodes that you’ve used?
  • Want to use a shortcode for a specific bit of information but can’t remember exactly what it’s called?
  • Need to a change a parameter for all occurences of a shortcode?

This is a simple administration tool that lists occurences of shortcodes within post content and/or custom fields, and/or widget settings.
You can select, or search for, specific shortcodes, and it can filter down to a provider, location, or post type.
It is intended to help administrators/editors locate where shortcodes have been used, so that they can be updated, renamed, deleted, or whatever.

Features include :

  • Search string(s) to match against shortcode tags – space or comma delimited for multple search strings
  • Filter by the type of provider of shortcode – whether it is provided by a plugin, your theme, internal to WordPress (eg. ), or unknown (an inactive/deleted plugin, maybe?)
  • Filter by a specific provider – a named plugin, for example
  • Filter by any number of specific, recognised shortcodes
  • Filter by where to look for the shortcode – post content, post meta data (custom fields), or widgets
  • Filter by the type of post that contains the shortcode
  • Results include (where relevant and available) : either the widget name and its sidebar, or a linked post title and the type of post; the shortcode and its parameters; the shortcode provider (WordPress, plugin, theme, or unknown), and where it was found
  • Has its own shortcode, for use when a plugin or theme only declares a shortcode when not in the admin backend

What it does not do :

  • It does not provide any insight as to what any shortcode does, or how to use/configure it.
  • It does not look at custom tables, theme options, transients.

If you like this plugin (or if you don’t?), please consider taking a moment or two to give it a
Review : it helps others, and gives me valuable feedback.

Shortcode

The shortcode for this plugin is…

[shortcodes_in_use/]

…and output is restricted to users with edit_posts capability.

The attributes available are in line with the options available in the Tool, and each one is a filter.
Setting an attribute for all possible values is the same as omitting that attribute.

Separate filters are ANDed, ie. specifying provider="wordpress" post_type="page" limits the results
to shortcode tags that are in a page AND provided by WordPress core.

Multiple values within a filter are ORed, ie. specifying post_type="post page" provider="wordpress"
limits the results to WordPress’s own shortcode tags that are in either a post OR a page.

When you run the Tool in admin, the equivalent shortcode for the selected options is provided at the end
of the results. Also, the sanitized shortcode is repeated at the top of the shortcode’s output.

  • search (string) : A space or comma is interpreted as a delimiter, so…

    [shortcodes_in_use search="foo bar"/]
    

    …looks for any shortcode tag that contains either “foo” or “bar”.

  • provider (string) : Any one or more of unknown, wordpress, plugin, or theme,
    delimited by either a comma or a space. For example…

    [shortcodes_in_use provider="plugin unknown"/]
    

    …reports any shortcode tag whose provider cannot be determined, or whose provider has be
    determined as being a plugin.

  • location (string) : Any one or more of title, content, excerpt, meta or widget,
    delimited by either a comma or a space. For example…

    [shortcodes_in_use location="content excerpt"/]
    

    …reports any shortcode tag found in any main content or excerpt area.

  • post_type (string) : Any one or more of WordPress’s standard post types – post, page,
    attachment, etc – and/or any custom post types. Multiple post types are comma- or space-delimited.
    For example…

    [shortcodes_in_use post_type="post,page"/]
    

    …reports any shortcode tag found in a post of type ‘post’ or ‘page’.

  • tag (string) : Any one or more shortcode tags, delimited by either a comma or a space. For
    example…

    [shortcodes_in_use tag="shortcodes_in_use, custom_menu_wizard"/]
    

    …reports any occurence of either of those two shortcode tags.

  • name (string) : This allows you to specify a specific plugin and/or theme by name. Multiple
    names are comma- or space-delimited, and each name must begin with either “plugin/” or “theme/”.
    For example…

    [shortcodes_in_use name="plugin/Shortcodes In Use, theme/Twenty Fifteen"/]
    

    …reports any occurence of a shortcode tag belonging to either the Shortcodes In Use plugin or
    the Twenty Fifteen theme. Instead of the name of the plugin/theme, you can supply their
    containing folder, so this would be an alternative for the example above…

    [shortcodes_in_use name="plugin/shortcodes-in-use, theme/twentyfifteen"/]