wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



balancetags › WordPress Function

Desde0.71
Obsoleton/a
balancetags ( $text, $force = false )
Parâmetros: (2)
  • (string) $text Text to be balanced
    Required: Yes
  • (bool) $force If true, forces balancing, ignoring the value of the option. Default false.
    Required: No
    Padrão: false
Retorna:
  • (string) Balanced text
Definido em:
Codex:

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



Fonte

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;
	}
}