输出编辑器脚本,样式表和默认设置。
原型
wp_enqueue_editor()
描述
页面加载后,可以在需要时初始化编辑器。有关初始化选项,请参阅wp-admin / js / editor.js中的wp.editor.initialize()。
源文件
路径:wp-includes/general-template.php
<?php
...
function wp_enqueue_editor() {
if ( ! class_exists( '_WP_Editors', false ) ) {
require( ABSPATH . WPINC . '/class-wp-editor.php' );
}
_WP_Editors::enqueue_default_editor();
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/wp_enqueue_editor/