| Server IP : 80.65.208.158 / Your IP : 216.73.216.25 Web Server : Microsoft-IIS/10.0 System : Windows NT VMI1501711 10.0 build 17763 (Windows Server 2019) AMD64 User : IWPD_134(rotechno) ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Inetpub/vhosts/rotechnochem.com/httpdocs/wp-content/themes/colibri-wp/inc/src/ |
Upload File : |
<?php
namespace ColibriWP\Theme;
use ColibriWP\Theme\Core\Hooks;
use ColibriWP\Theme\Core\Utils;
class Defaults {
private static $defaults = array();
private static $loaded = false;
public static function getDefaults() {
return static::$defaults;
}
public static function get( $key, $fallback = null ) {
static::load();
return Utils::pathGet( static::$defaults, $key, $fallback );
}
public static function load() {
if ( static::$loaded ) {
return;
}
$defaults = require_once get_template_directory() . "/inc/defaults.php";
if ( file_exists( get_template_directory() . "/inc/template-defaults.php" ) ) {
$template_defaults = require_once get_template_directory() . "/inc/template-defaults.php";
static::$defaults = array_replace_recursive( $template_defaults, $defaults );
}
static::$defaults = Hooks::colibri_apply_filters( 'defaults', static::$defaults, $defaults );
static::$loaded = true;
}
}