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

git-svn-id: http://svn.automattic.com/wordpress/trunk@12230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-11-19 22:47:11 +00:00
parent 1d3d70d375
commit 3de2e1a319
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. * @return string|bool False if not found. Permalink structure string.
*/ */
function get_extra_permastruct($name) { function get_extra_permastruct($name) {
if ( empty($this->permalink_structure) )
return false;
if ( isset($this->extra_permastructs[$name]) ) if ( isset($this->extra_permastructs[$name]) )
return $this->extra_permastructs[$name]; return $this->extra_permastructs[$name];
return false; return false;