balanceTags

Definition:
function balanceTags( $text, $force = false ) {}

Will only balance the tags if forced to and the option is set to balance tags.
The option ‘use_balanceTags’ is used for whether the tags will be balanced. Both the $force parameter and ‘use_balanceTags’ option will have to be true before the tags will be balanced.

Parameters

  • string $text: Text to be balanced
  • bool $force: Forces balancing, ignoring the value of the option. Default false.

Return values

returns:Balanced text

Source code

function balanceTags( $text, $force = false ) {

	if ( !$force && get_option('use_balanceTags') == 0 )

		return $text;

	return force_balance_tags( $text );

}

559

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: