From ce72d762f888e9829c598dc58d1e398d8bf6ed2f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 1 Feb 2013 22:20:06 +0000 Subject: [PATCH] Correct the documentation for balanceTags(). Remove unnecessary boolean inversion. props TobiasBg. fixes #22537. git-svn-id: https://develop.svn.wordpress.org/trunk@23368 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/formatting.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 016b0900a9..83f5269eca 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1160,9 +1160,7 @@ function convert_chars($content, $deprecated = '') { } /** - * Will only balance the tags if forced to and the option is set to balance tags. - * - * The option 'use_balanceTags' is used to determine whether the tags will be balanced. + * Balances tags if forced to, or if the 'use_balanceTags' option is set to true. * * @since 0.71 * @@ -1171,9 +1169,10 @@ function convert_chars($content, $deprecated = '') { * @return string Balanced text */ function balanceTags( $text, $force = false ) { - if ( !$force && get_option('use_balanceTags') == 0 ) + if ( $force || get_option('use_balanceTags') == 1 ) + return force_balance_tags( $text ); + else return $text; - return force_balance_tags( $text ); } /**