_core = $_core; $this->init(); } /** * Do Init * * @since 9 * @access private */ private function init() { add_action( 'admin_head', array( $this, 'admin_style' ) ); } /** * Add Block Editor Style to Header if currently edited page is a custom 404 error page * * @since 9 * @access public */ public function admin_style() { if ( $this->is_gutenberg_editing() ) { ?> id == 'page' && $this->_core->get_id() > 0 ) { // Is the block editor active for pages and is the classic editor not loaded? if ( function_exists( 'use_block_editor_for_post_type' ) && use_block_editor_for_post_type( 'page' ) && ! isset( $_GET['classic-editor'] ) ) { global $post; $all404pages = $this->_core->get_all_page_ids(); // Is the currently edited page a custom 404 error page? if ( in_array( $post->ID, $all404pages ) ) { return true; } } } return false; } } } ?>