Ticket #19875: 19875.2.diff
File 19875.2.diff, 1.3 KB (added by , 13 years ago) |
---|
-
wp-includes/rewrite.php
807 807 /** 808 808 * Retrieve all of the rewrite rules for pages. 809 809 * 810 * If the 'use_verbose_page_rules' property is false, then there will only811 * be a single rewrite rule for pages for those matching '%pagename%'. With812 * the property set to true, the attachments and the pages will be added for813 * each individual attachment URI and page URI, respectively.814 *815 810 * @since 1.5.0 816 811 * @access public 817 812 * 818 813 * @return array 819 814 */ 820 815 function page_rewrite_rules() { 821 $rewrite_rules = array();822 $ page_structure = $this->get_page_permastruct();816 // the extra .? at the beginning prevents clashes with other regular expressions in the rules array 817 $this->add_rewrite_tag( '%pagename%', '(.?.+?)', 'pagename=' ); 823 818 824 // the extra .? at the beginning prevents clashes with other regular expressions in the rules array 825 $this->add_rewrite_tag('%pagename%', "(.?.+?)", 'pagename='); 826 $rewrite_rules = array_merge($rewrite_rules, $this->generate_rewrite_rules($page_structure, EP_PAGES)); 827 return $rewrite_rules; 819 return $this->generate_rewrite_rules( $this->get_page_permastruct(), EP_PAGES ); 828 820 } 829 821 830 822 /**