2 Star 3 Fork 0

Hankin-han/wp-theme-markdown

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
wp-editormd.php 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
<?php
/**
* Plugin Name: WP Editor.md
* Plugin URI: https://github.com/JaxsonWang/WP-Editor.md
* Description: Perhaps this is the best and most perfect Markdown editor in WordPress
* Version: 6.0.4
* Author: 淮城一只猫
* Author URI: https://iiong.com
* License: GPL-3.0+
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
* Text Domain: editormd
* Domain Path: /languages
*/
namespace Root;
use Editormd\Main;
use Utils\Activator;
use Utils\Deactivator;
define( 'WP_EDITORMD_VER', '6.0.4' ); //版本说明
define( 'WP_EDITORMD_URL', get_template_directory_uri().'/libs/plugins/wp-editormd/'); //插件资源路径
define( 'WP_EDITORMD_PATH', dirname( __FILE__ ) ); //插件路径文件夹
define( 'WP_EDITORMD_NAME', plugin_basename( __FILE__ ) ); //插件名称
// 自动载入文件
require_once WP_EDITORMD_PATH . '/vendor/autoload.php';
/**
* 插件激活期间运行的代码
* includes/class-plugin-name-activator.php
*/
function activate_editormd() {
Activator::activate();
}
/**
* 在插件停用期间运行的代码
* includes/class-plugin-name-deactivator.php
*/
function deactivate_editormd() {
Deactivator::deactivate();
}
register_activation_hook( __FILE__, '\Root\activate_editormd' );
register_deactivation_hook( __FILE__, '\Root\deactivate_editormd' );
/**
* 开始执行插件
*/
function run_editormd() {
$plugin = new Main();
$plugin->run();
}
run_editormd();
// 默认就启动这个插件
activate_editormd();
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/hanhanjun_admin/wp-theme-markdown.git
[email protected]:hanhanjun_admin/wp-theme-markdown.git
hanhanjun_admin
wp-theme-markdown
wp-theme-markdown
master

搜索帮助