WordPress at a glance

balanceTags() WP 1.0

Balances tags if forced to, or if the 'use_balanceTags' option is set to true.

Works based on: force_balance_tags()

No Hooks.

Return

String. Balanced text

Usage

balanceTags( $text, $force );
$text(string) (required)
Text to be balanced
$force(true/false)
If true, forces balancing, ignoring the value of the option.
Default: false

Code of balanceTags: wp-includes/formatting.php VER 5.0.1

<?php
function balanceTags( $text, $force = false ) {
	if ( $force || get_option('use_balanceTags') == 1 ) {
		return force_balance_tags( $text );
	} else {
		return $text;
	}
}

Related Functions

From tag: Site security (safety)

More from category: Formatting

No comments
    Hello, !     Log In . Register