function format_to_edit( $content, $richedit = false ) {}

Acts on text which is about to be edited.
Unless $richedit is set, it is simply a holder for the ‘format_to_edit’ filter. If $richedit is set true htmlspecialchars(), through esc_textarea(), will be run on the content, converting special characters to HTML entities.


  • string $content: The text about to be edited.
  • bool $richedit: Whether the $content should pass through htmlspecialchars(). Default false.

Return values

returns:The text after the filter (and possibly htmlspecialchars()) has been run.

Defined filters

  • format_to_edit
    apply_filters( 'format_to_edit', $content )

Source code

function format_to_edit( $content, $richedit = false ) {

	$content = apply_filters( 'format_to_edit', $content );

	if ( ! $richedit )

		$content = esc_textarea( $content );

	return $content;



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: