From e06aa222ea03d71d069ec6f9423dce06830566e4 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 15 May 2014 06:48:16 +0000 Subject: [PATCH] Eliminate the use of `extract()` in `get_post_reply_link()`. See #22400. git-svn-id: https://develop.svn.wordpress.org/trunk@28429 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment-template.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index 400f0b1f95..6128f7bdca 100644 --- a/src/wp-includes/comment-template.php +++ b/src/wp-includes/comment-template.php @@ -1387,18 +1387,21 @@ function get_post_reply_link($args = array(), $post = null) { ); $args = wp_parse_args($args, $defaults); - extract($args, EXTR_SKIP); + $add_below = $args['add_below']; + $respond_id = $args['respond_id']; + $reply_text = $args['reply_text']; $post = get_post($post); - if ( !comments_open($post->ID) ) + if ( ! comments_open( $post->ID ) ) { return false; + } - if ( get_option('comment_registration') && ! is_user_logged_in() ) - $link = '' . $login_text . ''; - else + if ( get_option('comment_registration') && ! is_user_logged_in() ) { + $link = '' . $args['login_text'] . ''; + } else { $link = "$reply_text"; - - $formatted_link = $before . $link . $after; + } + $formatted_link = $args['before'] . $link . $args['after']; /** * Filter the formatted post comments link HTML. *