WordPress函数:wp_enqueue_editor 引入经典编辑器所需的js,css

江河/ 01月30日/ WordPress/ 浏览 352

函数原型:


wp_enqueue_editor()


输出编辑器脚本、样式表和默认设置。


页面加载后,可以在需要时初始化编辑器。


有关初始化选项,请参阅wp-admin/js/editor.js中的wp.editor.initialize()。


函数源码:


function wp_enqueue_editor() {
	if ( ! class_exists( '_WP_Editors', false ) ) {
		require ABSPATH . WPINC . '/class-wp-editor.php';
	}

	_WP_Editors::enqueue_default_editor();
}


发表评论

暂无评论,抢个沙发...

客服 工单