Replace hardcoded usage of comment-page with the comment pagination base.

props johnbillion, SergeyBiryukov, webord.
fixes #18084.

git-svn-id: https://develop.svn.wordpress.org/trunk@31459 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2015-02-14 03:47:02 +00:00
parent 4138275df9
commit 5aac59d178
4 changed files with 17 additions and 8 deletions

View File

@@ -503,6 +503,15 @@ class WP_Rewrite {
*/
public $pagination_base = 'page';
/**
* Comments pagination permalink base.
*
* @since 4.2.0
* @access private
* @var string
*/
var $comments_pagination_base = 'comment-page';
/**
* Feed permalink base.
*
@@ -1256,7 +1265,7 @@ class WP_Rewrite {
//build a regex to match the trackback and page/xx parts of URLs
$trackbackregex = 'trackback/?$';
$pageregex = $this->pagination_base . '/?([0-9]{1,})/?$';
$commentregex = 'comment-page-([0-9]{1,})/?$';
$commentregex = $this->comments_pagination_base . '-([0-9]{1,})/?$';
//build up an array of endpoint regexes to append => queries to append
if ( $endpoints ) {