From cf4e9851fe07cdfa997f56703fbeb46463cf9afa Mon Sep 17 00:00:00 2001 From: Jon Cave Date: Sun, 22 Jan 2012 17:21:29 +0000 Subject: [PATCH] Simplify code in WP_Rewrite::page_rewrite_rules() and remove out-of-date documenation. Fixes #19875. git-svn-id: https://develop.svn.wordpress.org/trunk@19736 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/rewrite.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 2354166991..dd2062968c 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -807,24 +807,16 @@ class WP_Rewrite { /** * Retrieve all of the rewrite rules for pages. * - * If the 'use_verbose_page_rules' property is false, then there will only - * be a single rewrite rule for pages for those matching '%pagename%'. With - * the property set to true, the attachments and the pages will be added for - * each individual attachment URI and page URI, respectively. - * * @since 1.5.0 * @access public * * @return array */ function page_rewrite_rules() { - $rewrite_rules = array(); - $page_structure = $this->get_page_permastruct(); - // the extra .? at the beginning prevents clashes with other regular expressions in the rules array - $this->add_rewrite_tag('%pagename%', "(.?.+?)", 'pagename='); - $rewrite_rules = array_merge($rewrite_rules, $this->generate_rewrite_rules($page_structure, EP_PAGES)); - return $rewrite_rules; + $this->add_rewrite_tag( '%pagename%', '(.?.+?)', 'pagename=' ); + + return $this->generate_rewrite_rules( $this->get_page_permastruct(), EP_PAGES ); } /**