WordPress Developer Ukraine, Kyiv
WordPress 6.4 New Features and Block Editor Improvements for Developers

WordPress 6.4 New Features and Block Editor Improvements for Developers

WordPress 6.4 for developers: Block Hooks, admin notices and options WordPress 6.4 (November 2023) is a release that looks small for users: a new default theme Twenty Twenty-Four, a lightbox for images, pattern categories. For developers it brought a few APIs that replace old workarounds: Block Hooks to insert a block into themes, two functions…
Use theme.json Global Styles and Fluid Typography in WordPress Block Themes

Use theme.json Global Styles and Fluid Typography in WordPress Block The ...

theme.json global styles and fluid typography in WordPress block themes theme.json is the single configuration of a block theme: it declares the design tokens (colors, font sizes, font families, spacing), decides which design controls the editor shows, and applies default styles to elements and blocks. WordPress turns it into CSS custom properties and styles that…
Register and Use WordPress Block Patterns for Reusable Layouts

Register and Use WordPress Block Patterns for Reusable Layouts

Register and use WordPress block patterns for reusable layouts Block patterns are ready-made arrangements of blocks that an editor inserts with one click: a hero section, a testimonial grid, a pricing table. For the block editor they are what shortcodes and copy-pasted HTML were for the classic one, only better: after insertion they are normal…
Process Background Jobs in WordPress with Action Scheduler

Process Background Jobs in WordPress with Action Scheduler

Background jobs in WordPress with Action Scheduler WP-Cron is fine for “run this every hour”, but it is a poor queue: events are stored in one option, there is no history, and thousands of pending events slow every request. Action Scheduler, the library WooCommerce uses for its own background work, stores each job as a…
Build a Gutenberg Block with InnerBlocks and Block Templates

Build a Gutenberg Block with InnerBlocks and Block Templates

A Gutenberg block with InnerBlocks and a template Some content has a fixed shape: a feature card is always an icon, a heading, a paragraph and a button. A custom block with InnerBlocks gives editors exactly that shape, filled with core blocks they already know, and the theme styles one predictable structure instead of whatever…
Add Custom User Roles and Capabilities to WordPress Programmatically

Add Custom User Roles and Capabilities to WordPress Programmatically

Add custom user roles and capabilities to WordPress programmatically A WordPress role is a named set of capabilities, stored in the wp_user_roles option. A user can have several roles, and code checks the capabilities, not the roles: current_user_can( 'edit_posts' ). Custom roles and capabilities let you give exactly the rights a job needs, instead of…
Register Custom REST API Endpoints with Authentication and Schema Validation in WordPress

Register Custom REST API Endpoints with Authentication and Schema Valida ...

Register custom REST API endpoints with authentication and schema validation register_rest_route() adds your own endpoints to the WordPress REST API. A route has a namespace (by convention myplugin/v1), a path (with optional regex parameters) and one or more handlers, each with HTTP methods, a callback, a permission callback and a description of the parameters. The…