/archives/%post_id% permalinks break for post ids over 1000. http://mosquito.wordpress.org/view.php?id=847

git-svn-id: https://develop.svn.wordpress.org/trunk@2296 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-02-13 18:26:50 +00:00
parent 093d13ed1c
commit 59e46cbb3e
1 changed files with 7 additions and 1 deletions

View File

@ -854,8 +854,14 @@ class WP_Rewrite {
} }
} }
// Do not allow the date tags and %post_id% to overlap in the permalink
// structure. If they do, move the date tags to $front/date/.
$front = $this->front;
if ( false !== strpos($this->permalink_structure, $this->front . '%post_id%') )
$front = $front . 'date/';
if (empty($this->date_structure)) { if (empty($this->date_structure)) {
$this->date_structure = $this->front . '%year%/%monthnum%/%day%'; $this->date_structure = $front . '%year%/%monthnum%/%day%';
} }
return $this->date_structure; return $this->date_structure;