WordPress.org

Make WordPress Core

Ticket #4626: 4626b.diff

File 4626b.diff, 1.1 KB (added by mdawaffe, 8 years ago)

backward compatibility method

  • wp-includes/formatting.php

     
    413413        return $text; 
    414414} 
    415415 
     416function balanceTags( $text, $force = false ) { 
     417        if ( !$force && get_option('use_balanceTags') == 0 ) 
     418                return $text; 
     419        return force_balance_tags( $text ); 
     420} 
     421 
    416422/* 
    417  balanceTags 
     423 force_balance_tags 
    418424 
    419425 Balances Tags of string using a modified stack. 
    420426 
     
    433439             Added Cleaning Hooks 
    434440        1.0  First Version 
    435441*/ 
    436 function balanceTags($text, $force = false) { 
    437  
    438         if ( !$force && get_option('use_balanceTags') == 0 ) 
    439                 return $text; 
    440  
     442function force_balance_tags( $text ) { 
    441443        $tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = ''; 
    442444 
    443445        # WP bug fix for comments - in case you REALLY meant to type '< !--' 
     
    534536        return $newtext; 
    535537} 
    536538 
    537 function force_balance_tags($text) { 
    538         return balanceTags($text, true); 
    539 } 
    540  
    541539function format_to_edit($content, $richedit = false) { 
    542540        $content = apply_filters('format_to_edit', $content); 
    543541        if (! $richedit )