mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 06:42:56 +02: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. Merges [35933] to the 4.4 branch. Fixes #34946. Built from https://develop.svn.wordpress.org/branches/4.4@35934 git-svn-id: http://core.svn.wordpress.org/branches/4.4@35898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6130060b53
commit
92e152cc2e
@ -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;
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4.1-alpha-35932';
|
||||
$wp_version = '4.4.1-alpha-35934';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user