balanceTags( string $text, bool $force = false )
Balances tags if forced to, or if the ‘use_balanceTags’ option is set to true.
Description Description
Parameters Parameters
- $text
-
(string) (Required) Text to be balanced
- $force
-
(bool) (Optional) If true, forces balancing, ignoring the value of the option.
Default value: false
Return Return
(string) Balanced text
Source Source
File: wp-includes/formatting.php
function balanceTags( $text, $force = false ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid if ( $force || (int) get_option( 'use_balanceTags' ) === 1 ) { return force_balance_tags( $text ); } else { return $text; } }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
0.71 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Unclosed LI tags
Will output this HTML: