/** * Envato Elements: Bootstrap File * * This starts things up. Registers the SPL and starts up some classes. * * @package Envato/Envato_Elements * @since 0.0.2 */ namespace Envato_Elements; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } spl_autoload_register( function ( $class ) { $prefix = __NAMESPACE__; $base_dir = __DIR__; $len = strlen( $prefix ); if ( strncmp( $prefix, $class, $len ) !== 0 || $class === $prefix ) { return; } $class = strtolower( $class ); $class = str_replace([ '\\', '_' ], [ '/', '-' ], $class ); $class_path = strtolower( substr( $class, $len + 1 ) ); $class_name = basename( $class_path ); $class_folder = dirname( $class_path ); if ( ! $class_folder || $class_folder === '.' ) { $class_folder = ''; } else { $class_folder .= DIRECTORY_SEPARATOR; } $file = $base_dir . DIRECTORY_SEPARATOR . $class_folder . 'class-' . $class_name . '.php'; if ( file_exists( $file ) ) { require $file; } else { die( esc_html( basename( $file ) . ' not found.' ) ); } } ); Plugin::get_instance(); Backend\Options::get_instance(); Backend\REST::get_instance(); Backend\Elementor_Modal::get_instance(); /** * Theme Functions * * @package Phox * @author WHMCSdes * @link https://whmcsdes.com */ if( ! defined('WDES_THEME_DIR' ) ){ define( 'WDES_THEME_DIR', get_template_directory() ); } if( ! defined('WDES_THEME_URI' ) ){ define( 'WDES_THEME_URI', get_template_directory_uri() ); } if(! defined('WDES_THEME_NAME') ){ define( 'WDES_THEME_NAME', 'phox' ); } if(! defined('WDES_THEME_VERSION') ){ define( 'WDES_THEME_VERSION', '1.6.8' ); } if(! defined('WDES_ASSETS_DIR') ){ define( 'WDES_ASSETS_DIR', WDES_THEME_DIR .'/assets' ); } if(! defined(' WDES_ASSETS_URI') ){ define( 'WDES_ASSETS_URI', WDES_THEME_URI .'/assets' ); } if(! defined('WDES_INC_DIR') ){ define( 'WDES_INC_DIR', WDES_THEME_DIR .'/includes' ); } if(! defined('WDES_INC_URI') ){ define( 'WDES_INC_URI', WDES_THEME_URI .'/includes' ); } if(! defined('WDES_ADMIN_DIR') ){ define( 'WDES_ADMIN_DIR', WDES_INC_DIR .'/core/admin/panel' ); } if(! defined('WDES_ADMIN_URI') ){ define( 'WDES_ADMIN_URI', WDES_INC_URI .'/core/admin/panel' ); } if(! defined('WDES_ADMIN_ASSETS_URI') ){ define( 'WDES_ADMIN_ASSETS_URI', WDES_ADMIN_URI .'/assets' ); } if(! defined('WDES_ADMIN_ASSETS_DIR') ){ define( 'WDES_ADMIN_ASSETS_DIR', WDES_ADMIN_DIR .'/assets' ); } if (! defined('WDES_OPTIONS_DIR')) { // trailingslashit is function in wordpress it use to add slash define('WDES_OPTIONS_DIR', WDES_ADMIN_DIR . "/wdes_options" ); } if (! defined('WDES_OPTIONS_URI')) { define('WDES_OPTIONS_URI', WDES_ADMIN_URI . "/wdes_options/"); } if (! defined('WDES_LANG_DIR')) { define('WDES_LANG_DIR', WDES_THEME_DIR . "/languages"); } /* Load Theme Text Domain */ load_theme_textdomain('phox', WDES_LANG_DIR); /* Autoloader and Require Files*/ require_once WDES_THEME_DIR. '/vendor/autoload.php'; /* Loader */ require_once WDES_INC_DIR. '/Load_files.php';