# wp_htmledit_pre()

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

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

> Устаревший элемент. Помечен устаревшим с версии 4.3.0.

## Сигнатура

```php
wp_htmledit_pre( string $output ): string
```

## Описание

Если $output не пуст, он будет пропущен через htmlspecialchars перед применением фильтра ‘htmledit_pre’.
См. alsoformat_for_editor()

## Параметры

- `$output` `string` — обязательный. Текст для форматирования.

## Возвращаемое значение

`string`

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

Файл: `wp-includes/deprecated.php:3629`

```php
function wp_htmledit_pre($output) {
	_deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' );

	if ( !empty($output) )
		$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // Convert only '< > &'.

	/**
	 * Filters the text before it is formatted for the HTML editor.
	 *
	 * @since 2.5.0
	 * @deprecated 4.3.0
	 *
	 * @param string $output The HTML-formatted text.
	 */
	return apply_filters( 'htmledit_pre', $output );
}
```

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

- 4.3.0 — Deprecated. Use format_for_editor()
- 2.5.0 — Introduced.

## Связанные

Использует: [`_deprecated_function`](https://chugunov.pro/api-wordpress/functions/_deprecated_function/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/), [`get_option`](https://chugunov.pro/api-wordpress/functions/get_option/).

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