# wp_editor()

URL: https://chugunov.pro/api-wordpress/functions/wp_editor/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 3.3.0.

## Сигнатура

```php
wp_editor( string $content, string $editor_id, array $settings = array() )
```

## Описание

Using this function is the proper way to output all needed components for both TinyMCE and Quicktags.
[_WP_Editors](https://developer.wordpress.org/reference/classes/_wp_editors/) should not be used directly. See [https://core.trac.wordpress.org/ticket/17144](https://core.trac.wordpress.org/ticket/17144).

NOTE: Once initialized the TinyMCE editor cannot be safely moved in the DOM. For that reason running [wp_editor()](https://developer.wordpress.org/reference/functions/wp_editor/) inside of a meta box is not a good idea unless only Quicktags is used.
On the post edit screen several actions can be used to include additional editors containing TinyMCE: ‘edit_page_form’, ‘edit_form_advanced’ and ‘dbx_post_sidebar’.
See [https://core.trac.wordpress.org/ticket/19173](https://core.trac.wordpress.org/ticket/19173) for more information.[See also](#see-also)
- [_WP_Editors::editor()](https://developer.wordpress.org/reference/classes/_WP_Editors/editor/)

- [_WP_Editors::parse_settings()](https://developer.wordpress.org/reference/classes/_WP_Editors/parse_settings/)

## Параметры

- `$content` `string` — обязательный. Начальное содержимое редактора.
- `$editor_id` `string` — обязательный. Значение HTML-атрибута ID для textarea и TinyMCE.
  
  Не должно содержать квадратных скобок.
- `$settings` `array` — необязательный, по умолчанию `array()`. See [_WP_Editors::parse_settings()](https://developer.wordpress.org/reference/classes/_wp_editors/parse_settings/) for description.

## Исходный код

Файл: `wp-includes/general-template.php:3992`

```php
function wp_editor( $content, $editor_id, $settings = array() ) {
	if ( ! class_exists( '_WP_Editors', false ) ) {
		require ABSPATH . WPINC . '/class-wp-editor.php';
	}
	_WP_Editors::editor( $content, $editor_id, $settings );
}
```

## История изменений

- 3.3.0 — Introduced.

## Связанные

Использует: `_WP_Editors::editor`.
Используется в: [`wp_comment_reply`](https://chugunov.pro/api-wordpress/functions/wp_comment_reply/), [`edit_form_image_editor`](https://chugunov.pro/api-wordpress/functions/edit_form_image_editor/), [`the_editor`](https://chugunov.pro/api-wordpress/functions/the_editor/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/wp_editor/
