mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
38f231e2ca
commit
b1806928e0
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user