diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 7140dc2c4e..2cb146af53 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -1843,12 +1843,15 @@ function force_balance_tags( $text ) { * it is simply a holder for the 'format_to_edit' filter. * * @since 0.71 + * @since 4.4.0 The `$richedit` parameter was renamed to `$rich_text` for clarity. * - * @param string $content The text about to be edited. - * @param bool $richedit Whether the $content should not pass through htmlspecialchars(). Default false (meaning it will be passed). + * @param string $content The text about to be edited. + * @param bool $rich_text Optional. Whether `$content` should be considered rich text, + * in which case it would not be passed through esc_textarea(). + * Default false. * @return string The text after the filter (and possibly htmlspecialchars()) has been run. */ -function format_to_edit( $content, $richedit = false ) { +function format_to_edit( $content, $rich_text = false ) { /** * Filter the text to be formatted for editing. * @@ -1857,7 +1860,7 @@ function format_to_edit( $content, $richedit = false ) { * @param string $content The text, prior to formatting for editing. */ $content = apply_filters( 'format_to_edit', $content ); - if ( ! $richedit ) + if ( ! $rich_text ) $content = esc_textarea( $content ); return $content; }