From b1806928e0bed2b395bd7b7086f1b8d28de3dbff Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 14 Jan 2009 23:06:46 +0000 Subject: [PATCH] Don't return comment page links if paging is disabled. fixes #8824 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@10361 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 893a2b633..3a2f207fb 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -1256,7 +1256,7 @@ function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) { function get_next_comments_link( $label = '', $max_page = 0 ) { global $wp_query; - if ( !is_singular() ) + if ( !is_singular() || !get_option('page_comments') ) return; $page = get_query_var('cpage'); @@ -1299,7 +1299,7 @@ function next_comments_link( $label = '', $max_page = 0 ) { * @return string|null */ function get_previous_comments_link( $label = '' ) { - if ( !is_singular() ) + if ( !is_singular() || !get_option('page_comments') ) return; $page = get_query_var('cpage'); @@ -1338,7 +1338,7 @@ function previous_comments_link( $label = '' ) { function paginate_comments_links($args = array()) { global $wp_query, $wp_rewrite; - if ( !is_singular() ) + if ( !is_singular() || !get_option('page_comments') ) return; $page = get_query_var('cpage');