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:
  • (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 || (int) get_option( 'use_balanceTags' ) === 1 ) {
		return force_balance_tags( $text );
	} else {
		return $text;
	}
}