Gutenberg block.json Cheat Sheet
block.json is the canonical block manifest. name uses the namespace/block-name form. apiVersion: 3 opts in to iframe rendering for parity with the front end.Use render to point at …
Read article →Notes on JavaScript, PHP, WordPress, design, performance, and the practical side of shipping better digital products.
Topics covered
The blog is designed to support both technical readers and clients who want clearer language around scope, quality, and implementation decisions.
block.json is the canonical block manifest. name uses the namespace/block-name form. apiVersion: 3 opts in to iframe rendering for parity with the front end.Use render to point at …
Read article →The lowest-risk migration: keep the classic theme, add theme.json, and start using block patterns and blocks alongside existing PHP templates. The site stays the same;…
Read article →Declare every dependency in the array: wp_enqueue_script('my', ..., ['wp-element', 'jquery']). WordPress resolves the load order automatically.For modules use wp_enqueue_script_mod…
Read article →For modern enqueues, wp_add_inline_script with a script handle is cleaner than wp_localize_script. It does not require a global variable name.For block editor data, use wp.data…
Read article →Always pass a sanitize_callback to register_setting(). Without one, anyone with the right capability can write arbitrary data into the option.Match the callback to the data:…
Read article →