diff --git a/assets/assets_load.php b/assets/assets_load.php index bbe654b..af0b8e0 100644 --- a/assets/assets_load.php +++ b/assets/assets_load.php @@ -9,10 +9,10 @@ add_action('admin_enqueue_scripts', 'nc_optimizeup_enqueue_script'); function nc_optimizeup_enqueue_script_frontend() { if (!is_admin()) { - wp_register_style( 'gdk_css', NC_BASE_URL.'assets/css/gdk.css', array(), NC_STORE_VER, 'all' ); - wp_register_script('code_prettify_js', NC_BASE_URL.'assets/js/prettify.min.js', array('jquery'), NC_STORE_VER, true); - wp_register_script('fancybox_js', NC_BASE_URL.'assets/js/fancybox.min.js', array('jquery'), NC_STORE_VER, true); - wp_register_script('lazyload_js', NC_BASE_URL.'assets/js/lazyload.min.js', array('jquery'), NC_STORE_VER, true); + wp_register_style( 'gdk_css', GDK_BASE_URL.'assets/css/gdk.css', array(), GDK_PLUGIN_VER, 'all' ); + wp_register_script('code_prettify_js', GDK_BASE_URL.'assets/js/prettify.min.js', array('jquery'), GDK_PLUGIN_VER, true); + wp_register_script('fancybox_js', GDK_BASE_URL.'assets/js/fancybox.min.js', array('jquery'), GDK_PLUGIN_VER, true); + wp_register_script('lazyload_js', GDK_BASE_URL.'assets/js/lazyload.min.js', array('jquery'), GDK_PLUGIN_VER, true); wp_enqueue_style( 'gdk_css' ); wp_enqueue_script('code_prettify_js'); wp_enqueue_script('lazyload_js'); diff --git a/class/class_load.php b/class/class_load.php new file mode 100644 index 0000000..9de87b0 --- /dev/null +++ b/class/class_load.php @@ -0,0 +1,7 @@ +/',$content,$matches); if($matches) { diff --git a/functions/func_load.php b/functions/func_load.php index 0a6041a..cfb1b6b 100644 --- a/functions/func_load.php +++ b/functions/func_load.php @@ -1,15 +1,14 @@ =')) { add_action('update_option_active_plugins', 'deactivate_myself'); } -define('NC_STORE_VER', '0.3.5'); -define('NC_STORE_FILE', __FILE__);//插件入口文件 -define('NC_BASE_URL', plugin_dir_url( __FILE__ ) );//插件目录url -define('NC_STORE_ROOT_PATH', plugin_dir_path( __FILE__ ) );//插件目录路径 - -include('class/clean-up.php'); -include('framework/plugin-options.php'); -include('functions/func_load.php'); -include('assets/assets_load.php'); +//定义各种常量 +define('GDK_PLUGIN_VER', '0.0.1'); +define('GDK_PLUGIN_FILE', __FILE__);//插件入口文件 +define('GDK_BASE_URL', plugin_dir_url( __FILE__ ) );//插件目录url +define('GDK_ROOT_PATH', plugin_dir_path( __FILE__ ) );//插件目录路径 +//加载各种资源 +include('class/class_load.php');//加载各种类 +include('framework/frame_load');//加载后台框架 +include('functions/func_load.php');//加载函数 +include('assets/assets_load.php');//加载静态资源