Ticket #14991: 14991.3.diff

File 14991.3.diff, 2.0 KB (added by prettyboymp, 3 years ago)
  • wp-includes/rewrite.php

     
    15501550                $page_rewrite = apply_filters('page_rewrite_rules', $page_rewrite); 
    15511551 
    15521552                // Extra permastructs 
     1553                $permastruct_rewrite = array(); 
    15531554                foreach ( $this->extra_permastructs as $permastructname => $permastruct ) { 
    15541555                        if ( is_array($permastruct) ) 
    15551556                                $rules = $this->generate_rewrite_rules($permastruct[0], $permastruct[1]); 
     
    15601561                        if ( 'post_tag' == $permastructname ) 
    15611562                                $rules = apply_filters('tag_rewrite_rules', $rules); 
    15621563 
    1563                         $this->extra_rules_top = array_merge($this->extra_rules_top, $rules); 
     1564                        $permastruct_rewrite = array_merge($permastruct_rewrite, $rules); 
    15641565                } 
    15651566 
    15661567                // Put them together. 
    15671568                if ( $this->use_verbose_page_rules ) 
    1568                         $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $registration_pages, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules); 
     1569                        $this->rules = $this->extra_rules_top + $permastruct_rewrite + $robots_rewrite + $default_feeds + $registration_pages + $page_rewrite + $root_rewrite + $comments_rewrite + $search_rewrite +  $author_rewrite + $date_rewrite + $post_rewrite + $this->extra_rules; 
    15691570                else 
    1570                         $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules); 
     1571                        $this->rules = $this->extra_rules_top + $permastruct_rewrite + $robots_rewrite + $default_feeds + $registration_pages + $root_rewrite + $comments_rewrite + $search_rewrite +  $author_rewrite + $date_rewrite + $post_rewrite + $page_rewrite + $this->extra_rules; 
    15711572 
    15721573                do_action_ref_array('generate_rewrite_rules', array(&$this)); 
    15731574                $this->rules = apply_filters('rewrite_rules_array', $this->rules);