Fix sunrise errors
This commit is contained in:
@ -45,11 +45,6 @@ class Sunrise {
|
||||
|
||||
require_once __DIR__ . '/functions/sunrise.php';
|
||||
|
||||
/**
|
||||
* Load development tools as soon as possible.
|
||||
*/
|
||||
\WP_Ultimo\Sunrise::load_development_mode();
|
||||
|
||||
/**
|
||||
* Load the core apis we need from the start.
|
||||
*/
|
||||
@ -111,8 +106,6 @@ class Sunrise {
|
||||
*/
|
||||
public static function load_dependencies() {
|
||||
|
||||
require_once dirname(__DIR__) . '/autoload.php';
|
||||
|
||||
require_once __DIR__ . '/deprecated/early-deprecated.php';
|
||||
|
||||
require_once __DIR__ . '/deprecated/mercator.php';
|
||||
@ -129,10 +122,24 @@ class Sunrise {
|
||||
|
||||
require_once __DIR__ . '/functions/array-helpers.php';
|
||||
|
||||
/*
|
||||
* Setup autoloader
|
||||
*/
|
||||
\WP_Ultimo\Autoloader::init();
|
||||
require_once __DIR__ . '/traits/trait-singleton.php';
|
||||
require_once __DIR__ . '/objects/class-limitations.php';
|
||||
require_once __DIR__ . '/models/traits/trait-limitable.php';
|
||||
require_once __DIR__ . '/models/traits/trait-notable.php';
|
||||
require_once __DIR__ . '/traits/trait-wp-ultimo-site-deprecated.php';
|
||||
require_once __DIR__ . '/database/engine/class-enum.php';
|
||||
require_once __DIR__ . '/database/sites/class-site-type.php';
|
||||
require_once __DIR__ . '/models/class-base-model.php';
|
||||
require_once __DIR__ . '/models/class-domain.php';
|
||||
require_once __DIR__ . '/models/class-site.php';
|
||||
require_once __DIR__ . '/domain-mapping/class-primary-domain.php';
|
||||
require_once __DIR__ . '/compat/class-domain-mapping-compat.php';
|
||||
require_once __DIR__ . '/class-domain-mapping.php';
|
||||
require_once __DIR__ . '/traits/trait-wp-ultimo-settings-deprecated.php';
|
||||
require_once __DIR__ . '/class-settings.php';
|
||||
require_once __DIR__ . '/limits/class-plugin-limits.php';
|
||||
require_once __DIR__ . '/limits/class-theme-limits.php';
|
||||
|
||||
|
||||
} // end load_dependencies;
|
||||
|
||||
@ -175,7 +182,7 @@ class Sunrise {
|
||||
/**
|
||||
* Load dependencies and get autoload running
|
||||
*/
|
||||
\WP_Ultimo\Sunrise::load_dependencies();
|
||||
self::load_dependencies();
|
||||
|
||||
/*
|
||||
* Adds backwards compatibility code for the domain mapping.
|
||||
@ -510,18 +517,6 @@ class Sunrise {
|
||||
|
||||
} // end tap;
|
||||
|
||||
/**
|
||||
* Load development modes, if we need too.
|
||||
*
|
||||
* @since 2.0.11
|
||||
* @return void
|
||||
*/
|
||||
protected static function load_development_mode() {
|
||||
|
||||
$should_load_tools = wu_load_dev_tools();
|
||||
|
||||
} // end load_development_mode;
|
||||
|
||||
// phpcs:ignore
|
||||
private function __construct() {} // end __construct;
|
||||
|
||||
|
@ -91,37 +91,6 @@ function wu_get_security_mode_key(): string {
|
||||
|
||||
} // end wu_get_security_mode_key;
|
||||
|
||||
/**
|
||||
* Load te dev tools, if they exist.
|
||||
*
|
||||
* @since 2.0.11
|
||||
*
|
||||
* @param boolean $load If we should load it or not.
|
||||
* @return string The path to the dev tools folder.
|
||||
*/
|
||||
function wu_load_dev_tools($load = true) {
|
||||
|
||||
if (defined('WP_ULTIMO_SUNRISE_FILE')) {
|
||||
/*
|
||||
* If the vendor folder exists, we are
|
||||
* for sure, inside a dev environment.
|
||||
*/
|
||||
$autoload_file = dirname((string) WP_ULTIMO_SUNRISE_FILE, 2) . '/vendor/autoload.php';
|
||||
|
||||
if (file_exists($autoload_file)) {
|
||||
|
||||
$load && require_once $autoload_file;
|
||||
|
||||
return $autoload_file;
|
||||
|
||||
} // end if;
|
||||
|
||||
} // end if;
|
||||
|
||||
return '';
|
||||
|
||||
} // end wu_load_dev_tools;
|
||||
|
||||
/**
|
||||
* Early substitute for wp_kses_data before it exists.
|
||||
*
|
||||
|
Reference in New Issue
Block a user