From 502ac958e513f7a79e1893eee3e47d2b678dfa5e Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 28 Mar 2014 02:38:14 +0000 Subject: [PATCH] Pass walker arguments to get_comment_link() so pagination works when wp_list_comments() is used outside the comment template. props SergeyBiryukov. fixes #27007. Built from https://develop.svn.wordpress.org/trunk@27799 git-svn-id: http://core.svn.wordpress.org/trunk@27634 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index b87844b601..19585f37a2 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -588,10 +588,8 @@ function get_comment_link( $comment = null, $args = array() ) { $comment = get_comment($comment); // Backwards compat - if ( !is_array($args) ) { - $page = $args; - $args = array(); - $args['page'] = $page; + if ( ! is_array( $args ) ) { + $args = array( 'page' => $args ); } $defaults = array( 'type' => 'all', 'page' => '', 'per_page' => '', 'max_depth' => '' ); @@ -1780,7 +1778,7 @@ class Walker_Comment extends Walker {
-
+