Don't return extra permastructs if pretty permalinks not turned on. Props scribu. fixes #11061

git-svn-id: https://develop.svn.wordpress.org/trunk@12230 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-11-19 22:47:11 +00:00
parent dd4f87da0d
commit 61d89b7b39
1 changed files with 2 additions and 0 deletions

View File

@ -1060,6 +1060,8 @@ class WP_Rewrite {
* @return string|bool False if not found. Permalink structure string.
*/
function get_extra_permastruct($name) {
if ( empty($this->permalink_structure) )
return false;
if ( isset($this->extra_permastructs[$name]) )
return $this->extra_permastructs[$name];
return false;