Make WordPress Core

Changeset 24129


Ignore:
Timestamp:
04/29/2013 02:48:31 PM (11 years ago)
Author:
nacin
Message:

Variables passed by reference do not need to be set first.

props kovshenin.
see #24222.

Location:
trunk/wp-includes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r24051 r24129  
    32653265    }
    32663266
    3267     $match = array();
    32683267    $found = false;
    32693268    while ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) {
  • trunk/wp-includes/media.php

    r24122 r24129  
    19091909function get_content_media( $type, &$content, $html = true, $remove = false, $limit = 0 ) {
    19101910    $items = array();
    1911     $matches = array();
    19121911
    19131912    if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) && ! empty( $matches ) ) {
     
    19281927        return $items;
    19291928
    1930     $src = '';
    19311929    $data = array();
    19321930
     
    19591957function get_embedded_media( $type, &$content, $remove = false, $limit = 0 ) {
    19601958    $html = array();
    1961     $matches = '';
    19621959
    19631960    foreach ( array( $type, 'object', 'embed', 'iframe' ) as $tag ) {
     
    22072204 */
    22082205function get_content_images( &$content, $html = true, $remove = false, $limit = 0 ) {
    2209     $matches = array();
    22102206    $tags = array();
    22112207    $captions = array();
     
    22562252        return $tags;
    22572253
    2258     $src = '';
    22592254    $srcs = array();
    22602255
     
    23012296 */
    23022297function get_content_galleries( &$content, $html = true, $remove = false, $limit = 0 ) {
    2303     $src = '';
    23042298    $galleries = array();
    2305     $matches = array();
    23062299
    23072300    if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) && ! empty( $matches ) ) {
     
    24942487
    24952488        $count = 1;
    2496         $matches = array();
    24972489        $content = $post->post_content;
    24982490
  • trunk/wp-includes/post-formats.php

    r24094 r24129  
    581581        }
    582582
    583         $matches = array();
    584583        $matched = preg_match( $newline_regex, $line, $matches );
    585584        if ( ! $matched )
     
    710709        return '';
    711710
    712     $matches = array();
    713711    if ( ! preg_match( '/<blockquote[^>]*>(.+?)<\/blockquote>/is', $content, $matches ) ) {
    714712        $quote = $content;
     
    783781    if ( empty( $content ) )
    784782        return '';
    785 
    786     $matches = array();
    787783
    788784    // the content is a URL
     
    884880    $output = '';
    885881    $has_teaser = false;
    886     $matches = array();
    887882
    888883    // If post password required and it doesn't match the cookie.
  • trunk/wp-includes/post-template.php

    r23975 r24129  
    186186    $output = '';
    187187    $has_teaser = false;
    188     $matches = array();
    189188
    190189    // If post password required and it doesn't match the cookie.
  • trunk/wp-includes/shortcodes.php

    r23729 r24129  
    153153function has_shortcode( $content, $tag ) {
    154154    if ( shortcode_exists( $tag ) ) {
    155         $matches = array();
    156155        preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
    157156        if ( empty( $matches ) )
Note: See TracChangeset for help on using the changeset viewer.