[wp-trac] [WordPress Trac] #12935: Evolve the URL routing system

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 23 11:42:55 UTC 2011


#12935: Evolve the URL routing system
--------------------------+-----------------------------
 Reporter:  mikeschinkel  |       Owner:  ryan
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Permalinks    |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+-----------------------------

Comment (by scribu):

 I'm thinking about an intermediary representation in between permastructs
 and the final rules array.

 A rule would look like this:

 {{{
 array(
   'pattern' => 'regex string',
   'args' => array( 'query_var' => preg_index_nr )
 )
 }}}

 Example:

 {{{
 array(
   'pattern' => 'tag/([^/]+)/page/?([0-9]{1,})/?$',
   'args' => array( 'tag' => 1, 'paged' => 2 )
 )
 }}}

 which would lead to:

 {{{
 'tag/([^/]+)/page/?([0-9]{1,})/?$' =>
 index.php?tag=$matches[1]&paged=$matches[2]
 }}}

 This doesn't solve the re-ordering problem, but I think it's a good start.

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


More information about the wp-trac mailing list