Patterns for building plugins that are safe and maintainable: settings pages, custom database tables, REST routes, nonces and capabilities, background jobs, tests and static analysis.
Group your blocks in their own inserter category A plugin with many blocks should not scatter them over “Text”, “Media” and “Design”. Its own category in the inserter keeps them together and makes them easy to find. WordPress 5.8 renamed the filter for it to block_categories_all; the old block_categories still works but is deprecated.
block.json in WordPress: apiVersion, attributes, supports and registration Since WordPress 5.8 a block can be described completely in a block.json file. It is the single source of truth for the block: name, title, category, icon, attributes, supported features, scripts and styles. WordPress reads it in PHP with register_block_type() and in JavaScript, and enqueues the assets…
wp_remote_post(): send JSON with a token and handle the errors Sending data to another service is a daily task: an order to a CRM, a form to a mailing service, an event to a webhook. wp_remote_post() is the WordPress way to do it. It works on any host (cURL or PHP streams, whatever is available),…