run(); } } // TODO remove random extension for caching function load_plugin_end() { wp_enqueue_style( 'vietswiss-style', plugin_dir_url(__FILE__).'/style.css?'.rand(1, 1000000) ); wp_enqueue_script( 'vietswiss-script', plugin_dir_url(__FILE__).'/script.js?'.rand(1, 1000000) ); } function load_plugin_start() { //wp_enqueue_style( 'fontawesome', 'https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css' ); } add_action( 'wp_enqueue_scripts', __NAMESPACE__. '\\load_plugin_end', 1000 ); add_action( 'wp_enqueue_scripts', __NAMESPACE__. '\\load_plugin_start', 1 ); function getModules() : array { $modules = []; foreach (glob(__DIR__.'/modules/*.php') as $file) { require_once $file; $class = __NAMESPACE__.'\\Modules\\'.basename($file, '.php'); if (class_exists($class)) { $obj = new $class; $modules[] = $obj; } } return $modules; } $viet_settings = new Settings();