From 26e9255450ef70ed122c596424f4d662cbd6a46d Mon Sep 17 00:00:00 2001 From: selul Date: Fri, 22 Nov 2024 20:54:37 +0200 Subject: [PATCH] revert changes --- inc/compatibility/web_stories.php | 2 +- inc/core/core_loader.php | 2 +- start.php | 10 ++-------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/inc/compatibility/web_stories.php b/inc/compatibility/web_stories.php index e287645e5f..430c67c42d 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' ) ); + add_action( 'after_setup_theme', 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 b35be758dc..6db32b3578 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( 'init', array( $front_end, 'setup_theme' ) ); + add_action( 'after_setup_theme', 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 ); } diff --git a/start.php b/start.php index 1e2e26eb27..00f352ddf1 100644 --- a/start.php +++ b/start.php @@ -53,14 +53,7 @@ function neve_run() { } $autoloader->register(); -} - -neve_run(); -/** - * Load core modules. - */ -function neve_core_loader() { if ( class_exists( '\\Neve\\Core\\Core_Loader' ) ) { new \Neve\Core\Core_Loader(); } @@ -78,4 +71,5 @@ function neve_core_loader() { \Neve_Pro\Core\Loader::instance(); } } -add_action( 'after_setup_theme', 'neve_core_loader' ); + +neve_run();