Make WordPress Core


Ignore:
Timestamp:
08/17/2015 09:38:24 PM (11 years ago)
Author:
ocean90
Message:

Pinking shears.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/shortcodes.php

    r33600 r33627  
    209209        $pattern = get_shortcode_regex();
    210210        $content = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $content );
    211        
     211
    212212        // Always restore square braces so we don't break things like <!--[if IE ]>
    213213        $content = unescape_invalid_shortcodes( $content );
    214        
     214
    215215        return $content;
    216216}
    … …  
    332332        $content = strtr( $content, $trans );
    333333        $trans = array( '[' => '&#91;', ']' => '&#93;' );
    334        
     334
    335335        $pattern = get_shortcode_regex();
    336336        $textarr = wp_html_split( $content );
    … …  
    369369                        continue;
    370370                }
    371                
     371
    372372                // Get element name
    373373                $front = array_shift( $attributes );
    … …  
    376376                preg_match('%[a-zA-Z0-9]+%', $front, $matches);
    377377                $elname = $matches[0];
    378                
     378
    379379                // Look for shortcodes in each attribute separately.
    380380                foreach ( $attributes as &$attr ) {
    … …  
    408408                }
    409409                $element = $front . implode( '', $attributes ) . $back;
    410                
     410
    411411                // Now encode any remaining [ or ] chars.
    412412                $element = strtr( $element, $trans );
    413413        }
    414        
     414
    415415        $content = implode( '', $textarr );
    416        
     416
    417417        return $content;
    418418}
    … …  
    430430        $trans = array( '&#91;' => '[', '&#93;' => ']' );
    431431        $content = strtr( $content, $trans );
    432        
     432
    433433        return $content;
    434434}
    … …  
    540540        // Always restore square braces so we don't break things like <!--[if IE ]>
    541541        $content = unescape_invalid_shortcodes( $content );
    542        
     542
    543543        return $content;
    544544}
Note: See TracChangeset for help on using the changeset viewer.