Don't hardcode the pagination base. Fixes #12507

git-svn-id: https://develop.svn.wordpress.org/trunk@15582 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu
2010-09-07 01:18:42 +00:00
parent 7ddd031d75
commit bfb520f616
5 changed files with 37 additions and 42 deletions

View File

@@ -479,6 +479,15 @@ class WP_Rewrite {
*/
var $comments_base = 'comments';
/**
* Pagination permalink base.
*
* @since 3.1.0
* @access private
* @var string
*/
var $pagination_base = 'page';
/**
* Feed permalink base.
*
@@ -1279,7 +1288,7 @@ class WP_Rewrite {
//build a regex to match the trackback and page/xx parts of URLs
$trackbackregex = 'trackback/?$';
$pageregex = 'page/?([0-9]{1,})/?$';
$pageregex = $this->pagination_base . '/?([0-9]{1,})/?$';
$commentregex = 'comment-page-([0-9]{1,})/?$';
//build up an array of endpoint regexes to append => queries to append