balanceTags( string $text, bool $force = false )
Balances tags if forced to, or if the ‘use_balanceTags’ option is set to true.
Parameters
- $text
-
(Required) Text to be balanced
- $force
-
(Optional) If true, forces balancing, ignoring the value of the option.
Default value: false
Return
(string) Balanced text
Source
File: wp-includes/formatting.php
function balanceTags( $text, $force = false ) {
if ( $force || get_option('use_balanceTags') == 1 ) {
return force_balance_tags( $text );
} else {
return $text;
}
}
Changelog
Version | Description |
---|---|
0.71 | Introduced. |