функция Устаревший since 2.0.0

wp_richedit_pre()

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

Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.

Сигнатура

wp_richedit_pre( string $text ): string

Описание

Здесь применяется фильтр ‘richedit_pre’. Если $text пуст, фильтр будет применён к пустой строке.
См. alsoformat_for_editor()

Оригинал (английский)

The ‘richedit_pre’ filter is applied here. If $text is empty the filter will be applied to an empty string.

See also

Параметры

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

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

string

Исходный код

wp-includes/deprecated.php:3586

function wp_richedit_pre($text) {
	_deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' );

	if ( empty( $text ) ) {
		/**
		 * Filters text returned for the rich text editor.
		 *
		 * This filter is first evaluated, and the value returned, if an empty string
		 * is passed to wp_richedit_pre(). If an empty string is passed, it results
		 * in a break tag and line feed.
		 *
		 * If a non-empty string is passed, the filter is evaluated on the wp_richedit_pre()
		 * return after being formatted.
		 *
		 * @since 2.0.0
		 * @deprecated 4.3.0
		 *
		 * @param string $output Text for the rich text editor.
		 */
		return apply_filters( 'richedit_pre', '' );
	}

	$output = convert_chars($text);
	$output = wpautop($output);
	$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) );

	/** This filter is documented in wp-includes/deprecated.php */
	return apply_filters( 'richedit_pre', $output );
}

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

ВерсияОписание
4.3.0 Deprecated. Use format_for_editor()
2.0.0 Introduced.

Что будем искать? Например,Продвижение

Этот сайт использует куки-файлы. Оставаясь на сайте, Вы соглашаетесь на их использование. Для получения дополнительной информации, пожалуйста, ознакомьтесь с политикой в отношении персональных данных.