WordPress.org

Make WordPress Core

Changeset 28428


Ignore:
Timestamp:
05/15/2014 06:42:19 AM (7 years ago)
Author:
wonderboymusic
Message:

Eliminate the use of extract() in wp_list_comments(). All unit tests pass.

See #22400.

File:
1 edited

Legend:

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

    r28323 r28428  
    19851985        $r['reverse_top_level'] = ( 'desc' == get_option('comment_order') );
    19861986
    1987     extract( $r, EXTR_SKIP );
    1988 
    1989     if ( empty($walker) )
     1987    if ( empty( $r['walker'] ) ) {
    19901988        $walker = new Walker_Comment;
    1991 
    1992     $output = $walker->paged_walk($_comments, $max_depth, $page, $per_page, $r);
     1989    } else {
     1990        $walker = $r['walker'];
     1991    }
     1992
     1993    $output = $walker->paged_walk( $_comments, $r['max_depth'], $r['page'], $r['per_page'], $r );
    19931994    $wp_query->max_num_comment_pages = $walker->max_pages;
    19941995
    19951996    $in_comment_loop = false;
    19961997
    1997     if ( $r['echo'] )
     1998    if ( $r['echo'] ) {
    19981999        echo $output;
    1999     else
     2000    } else {
    20002001        return $output;
     2002    }
    20012003}
    20022004
Note: See TracChangeset for help on using the changeset viewer.