| @@ -72,16 +72,14 @@ | ||
| 72 | 72 | 'wp-editor', |
| 73 | 73 | 'wp-block-editor' |
| 74 | 74 | ]; |
| 75 | 75 | |
| 76 | - $current_screen = get_current_screen(); | |
| 77 | - | |
| 78 | 76 | $_style_handler_object = [ |
| 79 | 77 | 'sth_nonce' => wp_create_nonce( 'betterdocs_style_handler_nonce' ), |
| 80 | 78 | 'editor_type' => 'edit-site' |
| 81 | 79 | ]; |
| 82 | 80 | |
| 83 | - if ( $hook == 'post-new.php' && $current_screen->is_block_editor || $hook == 'post.php' && $current_screen->is_block_editor ) { | |
| 81 | + if ( $hook == 'post-new.php' || $hook == 'post.php' ) { | |
| 84 | 82 | $_style_handler_deps[] = 'wp-edit-post'; |
| 85 | 83 | $_style_handler_object['editor_type'] = 'edit-post'; |
| 86 | 84 | } elseif ( $hook == 'site-editor.php' ) { |
| 87 | 85 | $_style_handler_deps[] = 'wp-edit-site'; |