mirror of
https://github.com/yunluo/gdk.git
synced 2024-06-05 23:32:23 +02:00
修正文件布局
This commit is contained in:
parent
13501ddc44
commit
d1573bd699
|
@ -9,10 +9,10 @@ add_action('admin_enqueue_scripts', 'nc_optimizeup_enqueue_script');
|
||||||
|
|
||||||
function nc_optimizeup_enqueue_script_frontend() {
|
function nc_optimizeup_enqueue_script_frontend() {
|
||||||
if (!is_admin()) {
|
if (!is_admin()) {
|
||||||
wp_register_style( 'gdk_css', NC_BASE_URL.'assets/css/gdk.css', array(), NC_STORE_VER, 'all' );
|
wp_register_style( 'gdk_css', GDK_BASE_URL.'assets/css/gdk.css', array(), GDK_PLUGIN_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('code_prettify_js', GDK_BASE_URL.'assets/js/prettify.min.js', array('jquery'), GDK_PLUGIN_VER, true);
|
||||||
wp_register_script('fancybox_js', NC_BASE_URL.'assets/js/fancybox.min.js', array('jquery'), NC_STORE_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', NC_BASE_URL.'assets/js/lazyload.min.js', array('jquery'), NC_STORE_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_style( 'gdk_css' );
|
||||||
wp_enqueue_script('code_prettify_js');
|
wp_enqueue_script('code_prettify_js');
|
||||||
wp_enqueue_script('lazyload_js');
|
wp_enqueue_script('lazyload_js');
|
||||||
|
|
7
class/class_load.php
Normal file
7
class/class_load.php
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
include( 'clean-up.php' );//数据库清理
|
||||||
|
include( 'local_avatars.php' );//本地头像
|
||||||
|
include( 'Payjs.php' );//支付功能
|
||||||
|
include( 'updates.php' );//在线更新
|
||||||
|
include( 'widget_cache.php' );//小工具缓存
|
||||||
|
|
4
framework/frame_load.php
Normal file
4
framework/frame_load.php
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?php
|
||||||
|
include( 'plugin-options.php' );//安全功能
|
||||||
|
//require ( 'shortcode.php' );//短代码
|
||||||
|
|
|
@ -50,7 +50,7 @@ function gdk_link_go($content) {
|
||||||
if(file_exists(ABSPATH.'go.php')) {
|
if(file_exists(ABSPATH.'go.php')) {
|
||||||
$gourl = home_url().'/go.php';
|
$gourl = home_url().'/go.php';
|
||||||
} else {
|
} else {
|
||||||
$gourl = NC_BASE_URL.'class/go.php';
|
$gourl = GDK_BASE_URL.'class/go.php';
|
||||||
}
|
}
|
||||||
preg_match_all('/<a(.*?)href="(.*?)"(.*?)>/',$content,$matches);
|
preg_match_all('/<a(.*?)href="(.*?)"(.*?)>/',$content,$matches);
|
||||||
if($matches) {
|
if($matches) {
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
include( 'Common.php' );//通用代码
|
||||||
//require ( 'shortcode.php' );//短代码
|
//require ( 'shortcode.php' );//短代码
|
||||||
|
|
||||||
include( 'optimization.php');//优化措施
|
include( 'optimization.php');//优化措施
|
||||||
include( 'advanced.php' );//头像功能
|
include( 'advanced.php' );//头像功能
|
||||||
include( 'security.php' );//安全功能
|
include( 'security.php' );//安全功能
|
||||||
include( 'utils.php' );//安全功能
|
|
||||||
include( 'Ajax.php' );//第三方服务
|
|
||||||
|
|
||||||
//require ( 'user.php' );//用户服务
|
include( 'Ajax.php' );//Ajax服务
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
include( 'seo.php' );//seo功能
|
include( 'seo.php' );//seo功能
|
||||||
|
|
||||||
//require ( 'email.php' );//邮箱功能
|
|
|
@ -1,33 +1,32 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Plugin Name: GitCafe Development Kit 极客公园开发套件
|
||||||
Plugin Name: GitCafe Development Kit 极客公园开发套件
|
Plugin URI: https://www.nicetheme.cn/nicetheme-plugins-store.html
|
||||||
Plugin URI: https://www.nicetheme.cn/nicetheme-plugins-store.html
|
Description: 为WordPress主题开发提供底层支持
|
||||||
Description: 为WordPress主题开发提供底层支持
|
Version: 0.0.1
|
||||||
Version: 0.3.5
|
Author : 云落
|
||||||
Author URI: http://www.nicetheme.cn
|
Author URI: http://www.nicetheme.cn
|
||||||
Text Domain: jimu
|
Compatible:5.3
|
||||||
Compatible:
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) { exit; }
|
if ( ! defined( 'ABSPATH' ) ) { exit; }
|
||||||
|
|
||||||
function deactivate_myself() {
|
function deactivate_myself() {
|
||||||
deactivate_plugins( plugin_basename( __FILE__ ) );
|
deactivate_plugins( plugin_basename( __FILE__ ) );
|
||||||
wp_die('启动失败,积木插件需要运行在 PHP 7.2 版本及更高的环境下。');
|
wp_die('启动失败,GDK插件需要运行在 PHP 7.2 版本及更高的环境下。');
|
||||||
}
|
}
|
||||||
if (!version_compare(PHP_VERSION, '7.2', '>=')) {
|
if (!version_compare(PHP_VERSION, '7.2', '>=')) {
|
||||||
add_action('update_option_active_plugins', 'deactivate_myself');
|
add_action('update_option_active_plugins', 'deactivate_myself');
|
||||||
}
|
}
|
||||||
|
|
||||||
define('NC_STORE_VER', '0.3.5');
|
//定义各种常量
|
||||||
define('NC_STORE_FILE', __FILE__);//插件入口文件
|
define('GDK_PLUGIN_VER', '0.0.1');
|
||||||
define('NC_BASE_URL', plugin_dir_url( __FILE__ ) );//插件目录url
|
define('GDK_PLUGIN_FILE', __FILE__);//插件入口文件
|
||||||
define('NC_STORE_ROOT_PATH', plugin_dir_path( __FILE__ ) );//插件目录路径
|
define('GDK_BASE_URL', plugin_dir_url( __FILE__ ) );//插件目录url
|
||||||
|
define('GDK_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');
|
|
||||||
|
|
||||||
|
//加载各种资源
|
||||||
|
include('class/class_load.php');//加载各种类
|
||||||
|
include('framework/frame_load');//加载后台框架
|
||||||
|
include('functions/func_load.php');//加载函数
|
||||||
|
include('assets/assets_load.php');//加载静态资源
|
||||||
|
|
Loading…
Reference in a new issue