Useful Code Snippets for WordPress 6.0
The WordPress 6.0, scheduled to be released on May 24th, 2022, will include several feature improvements. Disable “Lock Blocks” in WordPress 6.0 When editing content using the block editor, a new UI element allows blocks to be locked to prevent changes from being made on a site, but there is a setting that can be used to disable block locking by user role, specific users, or globally. To disable block locking globally on posts and pages then, you can use the following code snippet; add_filter( ‘block_editor_settings_all’, function( $settings, $context ) { // Disable for posts/pages. if ( $context->post &&