
WordPress数据库初学者指南
wp_enqueue_editor ( No parameters )
wp_enqueue_editor: 这个函数用于排队等候WordPress块编辑器所需的脚本和样式: 这个函数应该在插件或主题中使用,以确保在编辑屏幕上加载必要的资产。
输出编辑器的脚本、样式表和默认设置。
编辑器可以在页面加载后需要时被初始化。关于初始化选项,请参见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(); }