wp_htmledit_pre

Formats text for the HTML editor.

Description

(string) wp_htmledit_pre( (string) $output ); 

Unless $output is empty it will pass through htmlspecialchars before the filter is applied.

Returns (string)

Formatted text after filter applied.

Parameters (1)

0. $output (string)
The text to be formatted.

Usage

  1. if ( !function_exists( 'wp_htmledit_pre' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The text to be formatted. 
  5. $output = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_htmledit_pre($output); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/deprecated.php  
  1. function wp_htmledit_pre($output) { 
  2. _deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' ); 
  3.  
  4. if ( !empty($output) ) 
  5. $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > & 
  6.  
  7. /** 
  8. * Filters the text before it is formatted for the HTML editor. 
  9. * @since 2.5.0 
  10. * @deprecated 4.3.0 
  11. * @param string $output The HTML-formatted text. 
  12. */ 
  13. return apply_filters( 'htmledit_pre', $output );