the_editor
Displays an editor: TinyMCE, HTML, or both.
Description
the_editor( (string) $content, (string) $id = 'content', (string) $prev_id = 'title', (constant) $media_buttons = true, (int) $tab_index = 2, (constant) $extended = true );
Parameters (6)
- 0. $content (string)
- Textarea content.
- 1. $id — Optional. (string) =>
'content'
- HTML ID attribute value. Default content..
- 2. $prev_id — Optional. (string) =>
'title'
- Unused.
- 3. $media_buttons — Optional. (constant) =>
true
- Whether to display media buttons. Default true.
- 4. $tab_index — Optional. (int) =>
2
- Unused.
- 5. $extended — Optional. (constant) =>
true
- Unused.
Usage
if ( !function_exists( 'the_editor' ) ) { require_once ABSPATH . WPINC . '/deprecated.php'; } // Textarea content. $content = ''; // Optional. HTML ID attribute value. Default 'content'. $id = 'content'; // Optional. Unused. $prev_id = 'title'; // Optional. Whether to display media buttons. Default true. $media_buttons = true; // Optional. Unused. $tab_index = 2; // Optional. Unused. $extended = true; // NOTICE! Understand what this does before running. $result = the_editor($content, $id, $prev_id, $media_buttons, $tab_index, $extended);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/deprecated.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 ) );
- }