Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




balancetags [ WordPress Function ]

balancetags ( $text, $force = false )
Parameters:
  • (string) $text Text to be balanced
  • (bool) $force If true, forces balancing, ignoring the value of the option. Default false.
Returns:
  • (string) Balanced text
Defined at:



Will only balance the tags if forced to and the option is set to balance tags.

The option 'use_balanceTags' is used to determine whether the tags will be balanced.

Source


<?php
function balanceTags$text$force false ) {
    if ( !
$force && get_option('use_balanceTags') == )
        return 
$text;
    return 
force_balance_tags$text );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics