WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/01/2013 10:20:06 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Correct the documentation for balanceTags(). Remove unnecessary boolean inversion. props TobiasBg. fixes #22537.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r23365 r23368  
    11611161
    11621162/**
    1163  * Will only balance the tags if forced to and the option is set to balance tags.
    1164  *
    1165  * The option 'use_balanceTags' is used to determine whether the tags will be balanced.
     1163 * Balances tags if forced to, or if the 'use_balanceTags' option is set to true.
    11661164 *
    11671165 * @since 0.71
     
    11721170 */
    11731171function balanceTags( $text, $force = false ) {
    1174     if ( !$force && get_option('use_balanceTags') == 0 )
     1172    if ( $force || get_option('use_balanceTags') == 1 )
     1173        return force_balance_tags( $text );
     1174    else
    11751175        return $text;
    1176     return force_balance_tags( $text );
    11771176}
    11781177
Note: See TracChangeset for help on using the changeset viewer.