Per-site: Tools → Blocks & Shortcodes
tools.php?page=lh-block-and-shortcode-auditor. Capability manage_options (filter lh_block_and_shortcode_auditor_return_site_capability), so each site’s administrators see their own site only.
- Summary view: every registered and used tag, with All, Unregistered and Registered views, a block or shortcode filter, search on tag or provider, and sortable Tag, Provider, Uses and Items columns. A status line shows when the registry was captured and when content was last fully scanned, and whether a scan is running.
- Rescan (nonce
lh_bsa_rescan): forces a full sweep, requests a registry capture and fires a loopback. - Details view (
&bsa_type=…&bsa_tag=…): every post or widget using one tag, with a view per status and Edit (core edit link, which also sends templates and template parts to the Site Editor), View (published, viewable items) and Rescan row actions. Rescan (noncelh_bsa_rescan_item_{post_id}) rescans that post and refreshes counts immediately. - Rows per page are screen options (
lh_block_and_shortcode_auditor_summary_per_page,_usage_per_page).
Network: Tools → Blocks & Shortcodes
network/admin.php?page=lh-block-and-shortcode-auditor, under the shared LH Network Tools menu. Capability install_plugins (filter lh_block_and_shortcode_auditor_return_network_capability).
- Overview: one row per active site with unregistered blocks, unregistered shortcodes, unregistered uses, registered counts and last update. All and With unregistered tags views, search by name or URL, sorting (most unregistered uses first by default), and View tags, Rescan and Dashboard row actions.
- Site view (
&site_id=…): the per-site summary table for that site, a site switcher, its scan status read in its own context, a link to its own Tools screen, and Rescan this site. - Details view (
&site_id=…&bsa_type=…&bsa_tag=…): rendered insideswitch_to_blog(). The usage table runs in network mode: edit links are built withget_admin_url()(post.php, or the Site Editor for templates using theirwp_themeterm) because the subsite’s custom post types are not registered in network admin, and per-item rescan is hidden. - Rescan (nonce
lh_bsa_rescan_site_{site_id}): clears the site’s scanner version option, requests a capture and fires a loopback to the site, which then sweeps itself. Nothing is queued into another site’s Action Scheduler from network admin.
Both list tables take the site ID, base URL and per-page option as constructor arguments so the network screen reuses them. List table classes load only on these screens.