From 3d5670c7a126fa187e18041843a49aee221b3ff7 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Thu, 21 Nov 2024 14:50:21 +0530 Subject: [PATCH] fix: remove other after_setup_theme hook --- inc/compatibility/web_stories.php | 2 +- inc/core/core_loader.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/compatibility/web_stories.php b/inc/compatibility/web_stories.php index 430c67c42d..e287645e5f 100644 --- a/inc/compatibility/web_stories.php +++ b/inc/compatibility/web_stories.php @@ -37,7 +37,7 @@ private function should_load() { * Load hooks. */ private function load_hooks() { - add_action( 'after_setup_theme', array( $this, 'setup' ) ); + add_action( 'init', array( $this, 'setup' ) ); add_action( 'wp_body_open', array( $this, 'embed' ) ); } diff --git a/inc/core/core_loader.php b/inc/core/core_loader.php index 6db32b3578..b35be758dc 100644 --- a/inc/core/core_loader.php +++ b/inc/core/core_loader.php @@ -174,7 +174,7 @@ function () { ); $front_end = new Front_End(); add_action( 'wp_enqueue_scripts', array( $front_end, 'enqueue_scripts' ) ); - add_action( 'after_setup_theme', array( $front_end, 'setup_theme' ) ); + add_action( 'init', array( $front_end, 'setup_theme' ) ); add_action( 'widgets_init', array( $front_end, 'register_sidebars' ) ); add_filter( 'load_script_translation_file', array( $front_end, 'fix_script_translation_files' ), 10, 3 ); }