apply_filters( 'format_for_editor', string $text, string $default_editor )
- Since
- 4.3.0
Filters the text after it is formatted for the editor.
Compatibility
- WordPress
- since 4.3.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$textstring- The formatted text.
$default_editorstring- The default editor for the current user.
It is usually either 'html' or 'tinymce'.
Where this hook fires · 1
wp-includes/formatting.php:4408format_for_editor()
Source code
* @since 4.3.0 * * @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 apply_filters( 'format_for_editor', $text, $default_editor );} /** * Performs a deep string replace operation to ensure the values in $search are no longer present. * * Repeats the replacement operation until it no longer replaces anything to remove "nested" valuesChangelog
Introduced in 4.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 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.