Ticket #6603: rewrite.patch
File rewrite.patch, 1.0 KB (added by , 16 years ago) |
---|
-
rewrite.php
1822 1822 $structure = ltrim($this->permalink_structure, '/'); 1823 1823 if ( $this->using_index_permalinks() ) 1824 1824 $structure = ltrim($this->permalink_structure, $this->index . '/'); 1825 1826 //support for static posts page with custom permalink 1827 $static_permalink = ''; 1828 if (get_option('show_on_front')) { 1829 $id = get_option('page_for_posts'); 1830 if (!empty($id)) { 1831 //get the page 1832 $page = get_page($id); 1833 1834 // use post_name for matching 1835 $static_permalink = $page->post_name; 1836 } 1837 } 1838 1825 1839 if ( 0 === strpos($structure, '%postname%') || 1826 1840 0 === strpos($structure, '%category%') || 1827 1841 0 === strpos($structure, '%tag%') || 1828 0 === strpos($structure, '%author%') ) 1842 0 === strpos($structure, '%author%') || 1843 0 === strpos($structure, $static_permalink) ) 1829 1844 $this->use_verbose_page_rules = true; 1830 1845 else 1831 1846 $this->use_verbose_page_rules = false;