WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/the editor


This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php. Use wp_editor instead.

Contents

Description

Display visual editor forms: TinyMCE, or HTML, or both. The amount of rows the text area will have for the content has to be between 3 and 100 or will default at 12. There is only one option used for all users, named 'default_post_edit_rows'. If the user can not use the rich editor (TinyMCE), then the switch button will not be displayed.

Usage

<?php the_editor($content$id$prev_id$media_buttons$tab_index$extended); ?>

Parameters

$content
(string) (required) Textarea content
Default: None
$id
(string) (optional) Generated HTML tag ID attribute value
Default: content
$prev_id
(string) (optional) HTML ID name for switching back and forth between visual editors
Default: title
$media_buttons
(bool) (optional) Whether to display media buttons
Default: true
$tab_index
(int) (optional) Tabindex for textarea element
Default: 2
$extended
(bool) (optional) Whether to display 'more' and 'fullscreen' buttons
Default: true

Notes

  • TinyMCE with media uploading requires the following scripts: post, editor, editor-functions, media-upload, jquery, jquery-ui-core, jquery-ui-tabs, tiny_mce. And the following styles: thickbox.
  • You may add only one editor on a page

Change Log

Source File

the_editor() is located in wp-includes/deprecated.php.