load_configs(); add_action('init', array($this, 'load_settings')); // Load the plugin settings add_action('wp', array($this, 'load_front')); // Load the front main class add_action('wp_enqueue_scripts', array($this, 'enqueue_loader_styles')); add_action('admin_enqueue_scripts', array($this, 'enqueue_loader_styles')); } /** * @description load configuration files */ public function load_configs(){ require_once LOFTLOADER_ROOT . 'configs/loftloader-config.php'; } /** * @description load plugin settings main class */ public function load_settings(){ is_admin() ? require_once LOFTLOADER_ROOT . 'settings/class-loftloader-settings.php' : ''; } /** * @description load plugin front main class */ public function load_front(){ !is_admin() ? require_once LOFTLOADER_ROOT . 'front/class-loftloader-front.php' : ''; } /** * @description register the loader style css for both plugin setting page and front end */ public function enqueue_loader_styles(){ wp_register_style('loftloader-animation', LOFTLOADER_CSS_URI . 'loftloader-animation.css', array(), '20161015'); } } new LoftLoader(); // Enable LoftLoader } ?>