From 3de2e1a31957e6721cf5afd6a584eb3b284f5ab9 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 19 Nov 2009 22:47:11 +0000 Subject: [PATCH] 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 --- wp-includes/rewrite.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 6eecf6a5a..69c76a853 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -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;