Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: format_to_edit

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

Line Code
1118  * will be run on the content, converting special characters to HTML entities.
1119  *
1120  * @since 0.71
1121  *
1122  * @param string $content The text about to be edited.
1123  * @param bool $richedit Whether the $content should pass through htmlspecialchars(). Default false.
1124  * @return string The text after the filter (and possibly htmlspecialchars()) has been run.
1125  */
1126 function format_to_edit( $content, $richedit = false ) {
1127      $content = apply_filters( 'format_to_edit', $content );
1128      if ( ! $richedit )
1129           $content = esc_textarea( $content );
1130      return $content;
1131 }
1132
1133 /**
1134  * Holder for the 'format_to_post' filter.
1135  *
1136  * @since 0.71