WordPress Developer Ukraine, Kyiv
Custom Post Statuses for Editorial Workflows in WordPress

Custom Post Statuses for Editorial Workflows in WordPress

Custom post statuses for an editorial workflow in WordPress WordPress has one step between draft and published: “Pending Review”. A newsroom often needs more: an editor sends a text back for revision or marks it as approved, and somebody else schedules it. register_post_status() adds such statuses, but the function has a known gap: the block…
ES2023 New JavaScript Features You Can Use in WordPress Development

ES2023 New JavaScript Features You Can Use in WordPress Development

ES2023 array methods in WordPress scripts: toSorted, toReversed, with, findLast sort(), reverse() and splice() change the array they are called on. When that array is shared state, for example the list a component renders or the value in a store, a “just for display” sort silently changes the data for every other part of the…
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…