mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-02 12:02:25 +08:00
14 lines
310 B
Text
14 lines
310 B
Text
add_filter(
|
|
'block_editor_settings_all',
|
|
function( $settings, $context ) {
|
|
|
|
// Disable for posts/pages.
|
|
if ( $context->post && $context->post->post_type === 'page' ) {
|
|
$settings['canLockBlocks'] = false;
|
|
}
|
|
|
|
return $settings;
|
|
},
|
|
10,
|
|
2
|
|
);
|