Definition:
function wp_richedit_pre($text) {}
Formats text for the rich text editor.
The filter ‘richedit_pre’ is applied here. If $text is empty the filter will be applied to an empty string.
Parameters
- string $text: The text to be formatted.
Return values
returns:The formatted text after filter is applied.
Defined filters
- richedit_pre
apply_filters('richedit_pre', '') - richedit_pre
apply_filters('richedit_pre', $output)
Source code
function wp_richedit_pre($text) {
// Filtering a blank results in an annoying <br />\n
if ( empty($text) ) return apply_filters('richedit_pre', '');
$output = convert_chars($text);
$output = wpautop($output);
$output = htmlspecialchars($output, ENT_NOQUOTES);
return apply_filters('richedit_pre', $output);
}
4067

February 12, 2011 


No comments yet... Be the first to leave a reply!