Make WordPress Core

Ticket #14991: 14991.2.diff

File 14991.2.diff, 967 bytes (added by prettyboymp, 14 years ago)

made sure top rules stayed first

  • wp-includes/rewrite.php

     
    16321632                // Extra permastructs
    16331633                foreach ( $this->extra_permastructs as $permastruct ) {
    16341634                        if ( is_array($permastruct) )
    1635                                 $this->extra_rules_top = array_merge($this->extra_rules_top, $this->generate_rewrite_rules($permastruct[0], $permastruct[1]));
     1635                                $this->extra_rules_top = array_reverse( array_merge( array_reverse( $this->generate_rewrite_rules( $permastruct[0], $permastruct[1] ) ), array_reverse( $this->extra_rules_top ) ) );
    16361636                        else
    1637                                 $this->extra_rules_top = array_merge($this->extra_rules_top, $this->generate_rewrite_rules($permastruct, EP_NONE));
     1637                                $this->extra_rules_top = array_reverse( array_merge( $this->generate_rewrite_rules( $permastruct, EP_NONE ) ), array_reverse( $this->extra_rules_top ) );
    16381638                }
    16391639
    16401640                // Put them together.