Digital Sovereignty for everyone

MCP abilities

Find Tag Usage

lh-block-and-shortcode-auditor/find-tag-usage Read-only Idempotent

Finds where a block or shortcode is used across the network, from each site’s last content scan. Returns a per-site summary (whether the tag is registered on that site, its provider, uses and item count) and a paged list of the posts, templates and widgets using it, each with title, status, occurrences and edit and view URLs. Pass tag as the full block name (e.g. tribe/event-datetime) or the bare shortcode tag without brackets. Optionally limit to one site_id or one object_status. Requires install_plugins; main site only.

Parameter Type Required Default Description
tag string Yes Block name or shortcode tag (no brackets). Exact match.
tag_type string No Omit to match both. One of: block, shortcode.
site_id integer No Limit to one site. Omit for the whole network.
object_status string No Limit items to one post status, e.g. publish or draft.
per_page integer No 100 Items per page, 1 to 500. Default 100.
page integer No 1 Page of items, from 1. Default 1.

Get Site Report

lh-block-and-shortcode-auditor/get-site-report Read-only Idempotent

Returns one site’s blocks and shortcodes, with whether each is registered, its provider and how often it is used. They come from its last registry capture and content scan: each tag with whether it is registered on that site, the plugin, theme or namespace that provides it, its total uses and the number of posts or widgets using it. Filter by tag_type, by registration (use unregistered to find content left behind by removed plugins), or by a search on tag or provider. Use find-tag-usage to list the items using a specific tag. Requires install_plugins; main site only.

Parameter Type Required Default Description
site_id integer Yes Site ID, as returned by list-sites.
tag_type string No Only blocks or only shortcodes. Omit for both. One of: block, shortcode.
registration string No "all" all (the default), registered, or unregistered to find tags no longer provided by any active plugin or theme. One of: all, registered, unregistered.
search string No Substring match on tag or provider.
orderby string No "usage_count" Sort field: total uses (the default), number of items using the tag, tag name or provider. One of: usage_count, object_count, tag, provider.
order string No "desc" Sort direction. Default desc. One of: asc, desc.
per_page integer No 100 Tags per page, 1 to 500. Default 100.
page integer No 1 Page of tags, from 1. Default 1.

List Sites

lh-block-and-shortcode-auditor/list-sites Read-only Idempotent

Returns active network sites with their registered and unregistered block and shortcode counts, most unregistered uses first. Each site also gives its total unregistered uses, and when it last captured its registry and fully scanned its content. Sorted by unregistered uses, most first. Set only_unregistered to return just the sites with unregistered tags. Use get-site-report for one site’s tags and find-tag-usage for where a tag is used. Requires install_plugins; main site only.

Parameter Type Required Default Description
only_unregistered boolean No false Only return sites with at least one unregistered block or shortcode.
search string No Case-insensitive substring match on site name or URL.
per_page integer No 100 Sites per page, 1 to 1000. Default 100.
page integer No 1 Page of sites, from 1. Default 1.

Rescan Site

lh-block-and-shortcode-auditor/rescan-site Idempotent

Asks one site to recapture its registered blocks and shortcodes and re-scan all of its content. The work runs in the background in that site’s own context, triggered by a request to the site, so results are not immediate: poll get-site-report or list-sites and watch sweep_in_progress and sweep_completed_gmt. Only changes the auditor’s own data, never site content. Requires install_plugins; main site only.

Parameter Type Required Default Description
site_id integer Yes Site ID, as returned by list-sites.
task_id integer No Optional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.