Changeset 5805
- Timestamp:
- 07/16/2007 07:23:41 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r5783 r5805 414 414 } 415 415 416 function balanceTags( $text, $force = false ) { 417 if ( !$force && get_option('use_balanceTags') == 0 ) 418 return $text; 419 return force_balance_tags( $text ); 420 } 421 416 422 /* 417 balanceTags423 force_balance_tags 418 424 419 425 Balances Tags of string using a modified stack. … … 434 440 1.0 First Version 435 441 */ 436 function balanceTags($text, $force = false) { 437 438 if ( !$force && get_option('use_balanceTags') == 0 ) 439 return $text; 440 442 function force_balance_tags( $text ) { 441 443 $tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = ''; 442 444 $single_tags = array('br', 'hr', 'img', 'input'); //Known single-entity/self-closing tags … … 535 537 536 538 return $newtext; 537 }538 539 function force_balance_tags($text) {540 return balanceTags($text, true);541 539 } 542 540
Note: See TracChangeset
for help on using the changeset viewer.