From 61d89b7b39e31e1ff5865cc57afaafc207ad5c29 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@12230 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/rewrite.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 6eecf6a5af..69c76a853f 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;