显示编辑器:TinyMCE,HTML或两者。
原型
the_editor( string $content, string $id = 'content', string $prev_id = 'title', bool $media_buttons = true, int $tab_index = 2, bool $extended = true )
参数
$content
(string)
(Required)
Textarea的内容。
$id
(string)
(Optional)
HTML ID属性值。
$prev_id
(string)
(Optional)
没用过。
$media_buttons
(bool)
(Optional)
是否显示媒体按钮。
$tab_index
(int)
(Optional)
没用过。
$extended
(bool)
(Optional)
没用过。
源文件
路径:wp-includes/deprecated.php
<?php
...
function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/the_editor/