Ticket #6603: rewrite-new.patch
File rewrite-new.patch, 945 bytes (added by , 16 years ago) |
---|
-
rewrite.php
826 826 $rewrite_rules = array(); 827 827 $page_structure = $this->get_page_permastruct(); 828 828 829 //support for static posts page with custom permalink 830 //no need to check if rewrite not enabled 831 if (get_option('show_on_front') && !$this->using_index_permalinks()) { 832 $id = get_option('page_for_posts'); 833 if (!empty($id)) { 834 //get the page 835 $page = get_page($id); 836 837 // use post_name for matching 838 if (0 === strpos(ltrim($this->permalink_structure, '/'), $page->post_name)) 839 $this->use_verbose_page_rules = true; 840 } 841 } 842 829 843 if ( ! $this->use_verbose_page_rules ) { 830 844 $this->add_rewrite_tag('%pagename%', "(.+?)", 'pagename='); 831 845 $rewrite_rules = array_merge($rewrite_rules, $this->generate_rewrite_rules($page_structure, EP_PAGES));