wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



balancetags › WordPress Function

Da0.71
Deprecaton/a
› balancetags ( $text, $force = false )
Parametri: (2)
  • (string) $text Text to be balanced.
    Richiesto: Sì
  • (bool) $force If true, forces balancing, ignoring the value of the option. Default false.
    Richiesto: No
    Default: false
Ritorna:
  • (string) Balanced text.
Definito a:
Codex:

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



Sorgenti

function balanceTags( $text, $force = false ) {  // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
	if ( $force || 1 === (int) get_option( 'use_balanceTags' ) ) {
		return force_balance_tags( $text );
	} else {
		return $text;
	}
}