diff --git a/inc/compatibility/web_stories.php b/inc/compatibility/web_stories.php index e287645e5f..bb18dcb1da 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( 'init', array( $this, 'setup' ) ); + $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 b35be758dc..bd892f40b3 100644 --- a/inc/core/core_loader.php +++ b/inc/core/core_loader.php @@ -173,8 +173,8 @@ function () { } ); $front_end = new Front_End(); + $front_end->setup_theme(); add_action( 'wp_enqueue_scripts', array( $front_end, 'enqueue_scripts' ) ); - 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 ); }