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
1107  * will be run on the content, converting special characters to HTML entities.
1108  *
1109  * @since 0.71
1110  *
1111  * @param string $content The text about to be edited.
1112  * @param bool $richedit Whether the $content should pass through htmlspecialchars(). Default false.
1113  * @return string The text after the filter (and possibly htmlspecialchars()) has been run.
1114  */
1115 function format_to_edit( $content, $richedit = false ) {
1116      $content = apply_filters( 'format_to_edit', $content );
1117      if ( ! $richedit )
1118           $content = esc_textarea( $content );
1119      return $content;
1120 }
1121
1122 /**
1123  * Holder for the 'format_to_post' filter.
1124  *
1125  * @since 0.71