format_for_editor хук-фильтрWP 4.3.0

Filters the text after it is formatted for the editor.

Использование

add_filter( 'format_for_editor', 'wp_kama_format_for_editor_filter', 10, 2 );

/**
 * Function for `format_for_editor` filter-hook.
 * 
 * @param string $text           The formatted text.
 * @param string $default_editor The default editor for the current user. It is usually either 'html' or 'tinymce'.
 *
 * @return string
 */
function wp_kama_format_for_editor_filter( $text, $default_editor ){

	// filter...
	return $text;
}
$text(строка)
The formatted text.
$default_editor(строка)
The default editor for the current user. It is usually either 'html' or 'tinymce'.

Список изменений

С версии 4.3.0 Введена.

Где вызывается хук

format_for_editor()
format_for_editor
wp-includes/formatting.php 4417
return apply_filters( 'format_for_editor', $text, $default_editor );

Где используется хук в WordPress

Использование не найдено.