WordPress.org

Make WordPress Core


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

Eliminate the use of extract() in get_post_reply_link().

See #22400.

File:
1 edited

Legend:

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

    r28428 r28429  
    13881388
    13891389    $args = wp_parse_args($args, $defaults);
    1390     extract($args, EXTR_SKIP);
     1390    $add_below = $args['add_below'];
     1391    $respond_id = $args['respond_id'];
     1392    $reply_text = $args['reply_text'];
    13911393    $post = get_post($post);
    13921394
    1393     if ( !comments_open($post->ID) )
     1395    if ( ! comments_open( $post->ID ) ) {
    13941396        return false;
    1395 
    1396     if ( get_option('comment_registration') && ! is_user_logged_in() )
    1397         $link = '<a rel="nofollow" href="' . wp_login_url( get_permalink() ) . '">' . $login_text . '</a>';
    1398     else
     1397    }
     1398
     1399    if ( get_option('comment_registration') && ! is_user_logged_in() ) {
     1400        $link = '<a rel="nofollow" href="' . wp_login_url( get_permalink() ) . '">' . $args['login_text'] . '</a>';
     1401    } else {
    13991402        $link = "<a rel='nofollow' class='comment-reply-link' href='" . get_permalink($post->ID) . "#$respond_id' onclick='return addComment.moveForm(\"$add_below-$post->ID\", \"0\", \"$respond_id\", \"$post->ID\")'>$reply_text</a>";
    1400 
    1401     $formatted_link = $before . $link . $after;
     1403    }
     1404    $formatted_link = $args['before'] . $link . $args['after'];
    14021405    /**
    14031406     * Filter the formatted post comments link HTML.
Note: See TracChangeset for help on using the changeset viewer.