the_editor_content filter-hookWP 2.1.0

Filters the default editor content.

Usage

add_filter( 'the_editor_content', 'wp_kama_the_editor_content_filter', 10, 2 );

/**
 * Function for `the_editor_content` filter-hook.
 * 
 * @param string $content        Default editor content.
 * @param string $default_editor The default editor for the current user. Either 'html' or 'tinymce'.
 *
 * @return string
 */
function wp_kama_the_editor_content_filter( $content, $default_editor ){

	// filter...
	return $content;
}
$content(string)
Default editor content.
$default_editor(string)
The default editor for the current user. Either 'html' or 'tinymce'.

Changelog

Since 2.1.0 Introduced.

Where the hook is called

_WP_Editors::editor()
the_editor_content
WP_Widget_Text::form()
the_editor_content
wp-includes/class-wp-editor.php 285
$content = apply_filters( 'the_editor_content', $content, $default_editor );
wp-includes/widgets/class-wp-widget-text.php 477
$text = apply_filters( 'the_editor_content', $instance['text'], $default_editor );

Where the hook is used in WordPress

wp-includes/class-wp-editor.php 273
add_filter( 'the_editor_content', 'format_for_editor', 10, 2 );
wp-includes/class-wp-editor.php 289
remove_filter( 'the_editor_content', 'format_for_editor' );
wp-includes/widgets/class-wp-widget-text.php 470
add_filter( 'the_editor_content', 'format_for_editor', 10, 2 );
wp-includes/widgets/class-wp-widget-text.php 481
remove_filter( 'the_editor_content', 'format_for_editor' );