From f3d679bb3716a2f8c0e2c8b37133ca18a5be31d7 Mon Sep 17 00:00:00 2001 From: "Md. Alimuzzaman Alim" Date: Mon, 20 Nov 2023 18:16:25 +0600 Subject: [PATCH] Update Helper.php --- includes/Helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Helper.php b/includes/Helper.php index ce6427d8..513aa1fb 100644 --- a/includes/Helper.php +++ b/includes/Helper.php @@ -389,13 +389,13 @@ public static function get_profile($type, $platformKey = null) return (object) []; } - + /** * Check is enable classic editor */ public static function is_enable_classic_editor() { $current_screen = get_current_screen(); - if ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() ) { + if ( is_object($current_screen) && method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() ) { return false; } return true;