WordPress.org

Make WordPress Core

Changeset 7594


Ignore:
Timestamp:
04/03/08 03:15:06 (7 years ago)
Author:
markjaquith
Message:

Parse shortcodes AFTER wpautop() to avoid mangling. Have wptexturize() ignore shortcodes so quotes stay straight. fixes #6444 for 2.5.1

Location:
branches/2.5/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-includes/formatting.php

    r7593 r7594  
    66    $output = ''; 
    77    $curl = ''; 
    8     $textarr = preg_split('/(<.*>)/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE); 
     8    $textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE); 
    99    $stop = count($textarr); 
    1010 
     
    2727        $curl = $textarr[$i]; 
    2828 
    29         if (isset($curl{0}) && '<' != $curl{0} && $next) { // If it's not a tag 
     29        if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next) { // If it's not a tag 
    3030            // static strings 
    3131            $curl = str_replace($static_characters, $static_replacements, $curl); 
  • branches/2.5/wp-includes/shortcodes.php

    r7561 r7594  
    130130} 
    131131 
    132 add_filter( 'the_content', 'do_shortcode', 9 ); 
     132add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop()  
    133133 
    134134?> 
Note: See TracChangeset for help on using the changeset viewer.