Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: richedit_pre

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
1103           '♥' => '♥',
1104           '♦' => '♦'
1105      );
1106
1107      return str_replace( array_keys($to_ncr), array_values($to_ncr), $text );
1108 }
1109
1110 function wp_richedit_pre($text) {
1111      // Filtering a blank results in an annoying <br />\n
1112      if ( empty($text) ) return apply_filters('richedit_pre', '');
1113
1114      $output = $text;
1115      $output = convert_chars($output);
1116      $output = wpautop($output);
1117
1118      // These must be double-escaped or planets will collide.
1119      $output = str_replace('&lt;', '&amp;lt;', $output);
1120      $output = str_replace('&gt;', '&amp;gt;', $output);
1121
1122      return apply_filters('richedit_pre', $output);
1123 }
1124
1125 function wp_htmledit_pre($output) {
1126      if ( !empty($output) )
1127           $output = htmlspecialchars($output, ENT_NOQUOTES); // convert only < > &
1128
1129      return apply_filters('htmledit_pre', $output);
1130 }
1131