1
0
Fork 0
mirror of https://github.com/yunluo/gdk.git synced 2024-05-17 21:56:40 +02:00
gdk/gdk.php
云落 2f66c5ddfe 1,优化了后台选项,去除了debug出来的报错
2,增加了微信,支付宝H5支付
3,优化了小工具缓存功能
4,去除暂时无用的文件
5,优化了metabox的代码
6,取消了设置友情链接分类ID功能,取代为自动获取
7,断代码模块去除多余无用代码
8,优化了导航页面的很多代码
2021-10-07 22:26:17 +08:00

43 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/*
Plugin Name: GitCafe Development Kit 极客公园开发套件
Plugin URI: https://gitcafe.net/
Description: 为WordPress主题开发提供底层支持
Version: 0.0.4
Author: 云落
Author URI: https://gitcafe.net/
Compatible:5.8.1
*/
//万能的开头
if (!defined('ABSPATH')) {exit;}
//版本和兼容检查
function deactivate_myself()
{
deactivate_plugins(plugin_basename(__FILE__));
wp_die('启动失败GDK插件不兼容Git主题且需要运行在 PHP 7.2 版本及更高的环境下。');
}
if (defined('GIT_URL')) {
add_action('update_option_active_plugins', 'deactivate_myself');
}
if (!version_compare(PHP_VERSION, '7.2', '>=')) {
add_action('update_option_active_plugins', 'deactivate_myself');
}
//定义各种常量
define('GDK_PLUGIN_VER', '0.0.4');
define('GDK_PLUGIN_FILE', __FILE__); //插件入口文件
define('GDK_BASE_URL', plugin_dir_url(__FILE__)); //插件目录url
define('GDK_ROOT_PATH', plugin_dir_path(__FILE__)); //插件目录路径
//加载各种资源
include 'framework/frame_load.php'; //加载后台框架
include 'class/class_load.php'; //加载各种类
include 'functions/func_load.php'; //加载函数
include 'assets/assets_load.php'; //加载静态资源