WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 2155 | * be applied to an empty string. |
| 2156 | * |
| 2157 | * @since 2.0.0 |
| 2158 | * |
| 2159 | * @param string $text The text to be formatted. |
| 2160 | * @return string The formatted text after filter is applied. |
| 2161 | */ |
| 2162 | function wp_richedit_pre($text) { |
| 2163 | // Filtering a blank results in an annoying <br />\n |
| 2164 | if ( empty($text) ) return apply_filters('richedit_pre', ''); |
| 2165 | |
| 2166 | $output = convert_chars($text); |
| 2167 | $output = wpautop($output); |
| 2168 | $output = htmlspecialchars($output, ENT_NOQUOTES); |
| 2169 | |
| 2170 | return apply_filters('richedit_pre', $output); |
| 2171 | } |
| 2172 | |
| 2173 | /** |
| 2174 | * Formats text for the HTML editor. |
| 2175 | * |
| 2176 | * Unless $output is empty it will pass through htmlspecialchars before the |
| 2177 | * 'htmledit_pre' filter is applied. |
| 2178 | * |
| 2179 | * @since 2.5.0 |