richedit_pre
Filter HookDescription
Filters text returned for the rich text editor. This filter is first evaluated, and the value returned, if an empty string is passed to wp_richedit_pre(). If an empty string is passed, it results in a break tag and line feed. If a non-empty string is passed, the filter is evaluated on the wp_richedit_pre() return after being formatted.Hook Information
File Location |
wp-includes/deprecated.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3608 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$output
|
Text for the rich text editor. |
Usage Examples
Basic Usage
<?php
// Hook into richedit_pre
add_filter('richedit_pre', 'my_custom_filter', 10, 1);
function my_custom_filter($output) {
// Your custom filtering logic here
return $output;
}
Source Code Context
wp-includes/deprecated.php:3608
- How this hook is used in WordPress core
<?php
3603 $output = convert_chars($text);
3604 $output = wpautop($output);
3605 $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) );
3606
3607 /** This filter is documented in wp-includes/deprecated.php */
3608 return apply_filters( 'richedit_pre', $output );
3609 }
3610
3611 /**
3612 * Formats text for the HTML editor.
3613 *
PHP Documentation
<?php
/**
* Filters text returned for the rich text editor.
*
* This filter is first evaluated, and the value returned, if an empty string
* is passed to wp_richedit_pre(). If an empty string is passed, it results
* in a break tag and line feed.
*
* If a non-empty string is passed, the filter is evaluated on the wp_richedit_pre()
* return after being formatted.
*
* @since 2.0.0
* @deprecated 4.3.0
*
* @param string $output Text for the rich text editor.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/deprecated.php
Related Hooks
Related hooks will be displayed here in future updates.