wppaste
WordPress

apply_filters( 'the_editor_content', string $content, string $default_editor )

Since
2.1.0
Filters the default editor content.

Compatibility

WordPress
since 2.1.0
  • 6.7.10
  • 6.8.11
  • 6.9.10
  • 7.0.7
  • 7.1.3

Present in every tracked release (6.7.10 to 7.1.3).

Parameters

$contentstring
Default editor content.
$default_editorstring
The default editor for the current user.
Either 'html' or 'tinymce'.

Where this hook fires · 2

  • wp-includes/class-wp-editor.php:289_WP_Editors::editor()
  • wp-includes/widgets/class-wp-widget-text.php:474WP_Widget_Text::form()

Source code

		 * @since 2.1.0		 *		 * @param string $content        Default editor content.		 * @param string $default_editor The default editor for the current user.		 *                               Either 'html' or 'tinymce'.		 */		$content = apply_filters( 'the_editor_content', $content, $default_editor ); 		// Remove the filter as the next editor on the same page may not need it.		if ( self::$this_tinymce ) {			remove_filter( 'the_editor_content', 'format_for_editor' );		}

Changelog

Introduced in 2.1.0. Unchanged from 6.7.10 through 7.1.3.

  1. 6.7.10
  2. 6.8.11
  3. 6.9.10
  4. 7.0.7
  5. 7.1.3

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.10 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.