[wp-trac] [WordPress Trac] #13701: Full support for middle and little endian permalink structures

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 16 19:05:21 UTC 2012


#13701: Full support for middle and little endian permalink structures
----------------------------------------+-----------------------------
 Reporter:  RevelationTravis            |       Owner:
     Type:  enhancement                 |      Status:  reopened
 Priority:  normal                      |   Milestone:  Future Release
Component:  Rewrite Rules               |     Version:  2.9.2
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |
----------------------------------------+-----------------------------

Comment (by wonderboymusic):

 In {{{WP_Rewrite}}}:

   ''The main WP_Rewrite function for building the rewrite rule list. The
 contents of the function is a mix of black magic and regular expressions,
 so best just ignore the contents and move to the parameters.''

 I think the contents of {{{generate_rewrite_rules}}} need a broader
 examination.

 Rewrite definitely has flaws - turns out the '''date_rewrite_rules'''
 filter happens '''after''' the '''post_rewrite_rules''' filter, but guess
 what? The '''post rewrites''' generates date archives as well and are
 loaded '''after''' the  '''date_rewrites''' in the final rewrite_rules
 array.

 By loaded I mean each of the rules merges in like so: {{{$rewrites[$regex]
 => $query}}}, which means they can completely overwrite any rule keyed by
 the same regex - which is why the the code has to be inline in
 {{{WP_Rewrite}}} to work, otherwise a plugin has to hijack the whole array
 so date rewrites don't break.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13701#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list