On this page
wp_htmledit_pre( string $output ): string
This function has been deprecated. Use format_for_editor() instead.
Formats text for the HTML editor.
Description
Unless $output is empty it will pass through htmlspecialchars before the ‘htmledit_pre’ filter is applied.
See also
Parameters
$outputstring Required-
The text to be formatted.
Return
string Formatted text after filter applied.
Source
File: wp-includes/deprecated.php. View all references
function wp_htmledit_pre($output) {
_deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' );
if ( !empty($output) )
$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // Convert only '< > &'.
/**
* Filters the text before it is formatted for the HTML editor.
*
* @since 2.5.0
* @deprecated 4.3.0
*
* @param string $output The HTML-formatted text.
*/
return apply_filters( 'htmledit_pre', $output );
}
Hooks
- apply_filters( 'htmledit_pre',
string $output ) -
Filters the text before it is formatted for the HTML editor.
Related
Uses
| Uses | Description |
|---|---|
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
| get_option() wp-includes/option.php | Retrieves an option value based on an option name. |
Changelog
| Version | Description |
|---|---|
| 4.3.0 | Use format_for_editor() |
| 2.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_htmledit_pre