Capabilities vs Roles: Get It Right
Check capabilities, never roles. current_user_can('manage_options') survives custom roles; current_user_can('administrator') breaks the first time someone adds a new admin-equivale…
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.
Check capabilities, never roles. current_user_can('manage_options') survives custom roles; current_user_can('administrator') breaks the first time someone adds a new admin-equivale…
Read article →Multisite makes sense when sites share users, themes, plugins, and a billing relationship — a university with department sites, an agency hosting clients with shared…
Read article →Every apply_filters() call has overhead — even with no hooked callbacks. On a hot path running thousands of times per request, that adds up.For inner-loop…
Read article →The Block Hooks API (WP 6.4+) lets a block declare it should auto-insert relative to another block. blockHooks in block.json maps target block names to…
Read article →When postmeta queries dominate your slow log, it is time for a custom table. dbDelta() with a CREATE TABLE statement on activation, then $wpdb queries…
Read article →