mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-30 11:42:22 +08:00
8 lines
310 B
Text
8 lines
310 B
Text
add_filter( \'enable_block_condition\', function( $default = true) {
|
|
if (isset($_REQUEST[\'post_type\']) && \'page\' === $_REQUEST[\'post_type\']) {
|
|
return false;
|
|
} elseif (isset($_GET[\'post\']) && \'page\' === get_post_type($_GET[\'post\'])) {
|
|
return false;
|
|
}
|
|
return $default;
|
|
} );
|