From 15cd5752b2d6071b2a160894bddbe279a94a72d4 Mon Sep 17 00:00:00 2001 From: duck_ 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: http://svn.automattic.com/wordpress/trunk@19736 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 ); } /**