| @@ -357,10 +357,9 @@ | ||
| 357 | 357 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output escaped in class. |
| 358 | 358 | echo new Meta_Fields_Presenter( $this->get_metabox_post(), 'social' ); |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | - $screen = WP_Screen::get(); | |
| 362 | - $is_block_editor = $screen && $screen->is_block_editor(); | |
| 361 | + $is_block_editor = YoastSEO()->helpers->current_page->is_block_editor(); | |
| 363 | 362 | if ( $is_block_editor && $this->get_metabox_post()->post_type === 'post' ) { |
| 364 | 363 | /** |
| 365 | 364 | * Filter: 'wpseo_enable_ai_content_planner_inline_banner' - Allows hiding the AI Content Planner inline banner site-wide. |
| 366 | 365 | * |
| @@ -861,9 +860,9 @@ | ||
| 861 | 860 | $asset_manager->enqueue_style( 'monorepo' ); |
| 862 | 861 | $asset_manager->enqueue_style( 'ai-generator' ); |
| 863 | 862 | $asset_manager->enqueue_style( 'ai-fix-assessments' ); |
| 864 | 863 | |
| 865 | - $is_block_editor = WP_Screen::get()->is_block_editor(); | |
| 864 | + $is_block_editor = YoastSEO()->helpers->current_page->is_block_editor(); | |
| 866 | 865 | $post_edit_handle = 'post-edit'; |
| 867 | 866 | if ( ! $is_block_editor ) { |
| 868 | 867 | $post_edit_handle = 'post-edit-classic'; |
| 869 | 868 | } |