2020-01-25 07:52:35 +01:00
|
|
|
|
<?php
|
|
|
|
|
/*
|
2020-01-29 05:43:14 +01:00
|
|
|
|
Plugin Name: GitCafe Development Kit 极客公园开发套件
|
2020-01-29 20:58:39 +01:00
|
|
|
|
Plugin URI: https://gitcafe.net/
|
2020-01-29 05:43:14 +01:00
|
|
|
|
Description: 为WordPress主题开发提供底层支持
|
|
|
|
|
Version: 0.0.1
|
2020-01-29 20:58:39 +01:00
|
|
|
|
Author: 云落
|
|
|
|
|
Author URI: https://gitcafe.net/
|
2020-02-02 09:12:28 +01:00
|
|
|
|
Compatible:5.3.2
|
2020-01-25 07:52:35 +01:00
|
|
|
|
*/
|
2020-01-29 05:43:14 +01:00
|
|
|
|
|
2020-01-25 07:52:35 +01:00
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) { exit; }
|
|
|
|
|
|
|
|
|
|
function deactivate_myself() {
|
|
|
|
|
deactivate_plugins( plugin_basename( __FILE__ ) );
|
2020-01-29 05:43:14 +01:00
|
|
|
|
wp_die('启动失败,GDK插件需要运行在 PHP 7.2 版本及更高的环境下。');
|
2020-01-25 07:52:35 +01:00
|
|
|
|
}
|
2020-01-27 19:08:46 +01:00
|
|
|
|
if (!version_compare(PHP_VERSION, '7.2', '>=')) {
|
2020-01-25 07:52:35 +01:00
|
|
|
|
add_action('update_option_active_plugins', 'deactivate_myself');
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-29 05:43:14 +01:00
|
|
|
|
//定义各种常量
|
|
|
|
|
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__ ) );//插件目录路径
|
2020-01-25 18:54:41 +01:00
|
|
|
|
|
2020-01-29 05:43:14 +01:00
|
|
|
|
//加载各种资源
|
2020-01-29 07:46:05 +01:00
|
|
|
|
include('framework/frame_load.php');//加载后台框架
|
2020-02-02 04:13:58 +01:00
|
|
|
|
include('class/class_load.php');//加载各种类
|
2020-01-29 05:43:14 +01:00
|
|
|
|
include('functions/func_load.php');//加载函数
|
|
|
|
|
include('assets/assets_load.php');//加载静态资源
|