mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Omit cpage query var in comment link if comment pagination is disabled.
WP 4.4 changed the way comment pagination is calculated. See #8071. In the context of `get_comment_link()`, these changes introduced a regression that causes `cpage` (or its pretty-permalink correlate `comment-page-x`) to appear in comment links when comment pagination is disabled. The current changeset fixes the regression. Fixes #34946. git-svn-id: https://develop.svn.wordpress.org/trunk@35933 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -736,7 +736,7 @@ function get_comment_link( $comment = null, $args = array() ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $cpage ) {
|
||||
if ( $cpage && get_option( 'page_comments' ) ) {
|
||||
if ( $wp_rewrite->using_permalinks() ) {
|
||||
if ( $cpage ) {
|
||||
$link = trailingslashit( $link ) . $wp_rewrite->comments_pagination_base . '-' . $cpage;
|
||||
|
||||
Reference in New Issue
Block a user