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
This commit is contained in:
ryan 2009-01-14 23:06:46 +00:00
parent 38f231e2ca
commit b1806928e0

View File

@ -1256,7 +1256,7 @@ function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
function get_next_comments_link( $label = '', $max_page = 0 ) { function get_next_comments_link( $label = '', $max_page = 0 ) {
global $wp_query; global $wp_query;
if ( !is_singular() ) if ( !is_singular() || !get_option('page_comments') )
return; return;
$page = get_query_var('cpage'); $page = get_query_var('cpage');
@ -1299,7 +1299,7 @@ function next_comments_link( $label = '', $max_page = 0 ) {
* @return string|null * @return string|null
*/ */
function get_previous_comments_link( $label = '' ) { function get_previous_comments_link( $label = '' ) {
if ( !is_singular() ) if ( !is_singular() || !get_option('page_comments') )
return; return;
$page = get_query_var('cpage'); $page = get_query_var('cpage');
@ -1338,7 +1338,7 @@ function previous_comments_link( $label = '' ) {
function paginate_comments_links($args = array()) { function paginate_comments_links($args = array()) {
global $wp_query, $wp_rewrite; global $wp_query, $wp_rewrite;
if ( !is_singular() ) if ( !is_singular() || !get_option('page_comments') )
return; return;
$page = get_query_var('cpage'); $page = get_query_var('cpage');