Add a Custom WP-CLI Command
Registers a "wp site-stats" WP-CLI command that prints counts of posts, pages, comments and users, as a template for your own command-line tools.
Snippet Library
Snippets for developers: debugging helpers, custom cron schedules, body classes, REST API tweaks and admin tools for checking hooks and queries. Building blocks for people who write code for WordPress every day.
Registers a "wp site-stats" WP-CLI command that prints counts of posts, pages, comments and users, as a template for your own command-line tools.
Adds a featured_image_url field to posts and pages in REST API responses, so headless front ends do not need a second request.
Adds a "wp heaviest-posts" command listing the posts and pages with the largest stored content, revisions excluded, to track down pasted base64 images or page builder bloat slowing the editor.
Sends an X-Robots-Tag: noindex header with every REST API response so search engines do not index raw JSON from /wp-json/ next to your real pages.
Registers a native JavaScript module with WordPress's Script Modules API and loads it only on pages that contain a chosen block, so modern ES module code needs no bundler and costs nothing elsewhere.
Enqueues a JavaScript or CSS file only on the pages you list, instead of on every page, to keep the rest of the site fast.
Adds an HTML comment at the bottom of front-end and admin pages with the number of database queries, generation time and peak memory. Visible to administrators only.
Lets REST API requests for posts and pages ask for more than 100 items at once, useful for exports and static site generators.
Adds every PHP file in wp-content/page-templates/ to the page Template menu of classic themes, so custom layouts survive theme switches and updates.
Stops chosen plugin or theme scripts and stylesheets from loading on the front end, optionally everywhere except the pages where they are needed.
Adds a "wp rename-shortcode" command that changes every use of one shortcode tag to another in posts and pages, attributes and closing tags included, useful when switching plugins.