On this page
WP_Screen::is_block_editor( bool $set = null ): bool
Sets or returns whether the block editor is loading on the current screen.
Parameters
$setbool Optional-
Sets whether the block editor is loading on the current screen or not.
Default:
null
Return
bool True if the block editor is being loaded, false otherwise.
Source
File: wp-admin/includes/class-wp-screen.php. View all references
public function is_block_editor( $set = null ) {
if ( null !== $set ) {
$this->is_block_editor = (bool) $set;
}
return $this->is_block_editor;
}
Related
Used By
| Used By | Description |
|---|---|
| wp_global_styles_render_svg_filters() wp-includes/script-loader.php | Renders the SVG filters supplied by theme.json. |
| WP_Privacy_Policy_Content::notice() wp-admin/includes/class-wp-privacy-policy-content.php | Add a notice with a link to the guide when editing the privacy policy page. |
Changelog
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_screen/is_block_editor