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

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 6 16:36:55 UTC 2010


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

Comment(by F J Kaiser):

 > > Another benefit i can see (if i fully understood everything) for
 theme-developers: This would reduce the list of define('PATH'..) in
 functions.php and identify path-segments (for combining the with $example
 = get_bloginfo('url') . get_part_of_path "/bla.php"; - note that
 get_part_of_path is just a custom function i just thought of) on the fly.
 >
 > This sounds interesting but I don't fully understand what you are
 envisioning. Can you please elaborate with maybe several specific use-case
 examples?

 Just for a short example (i had no time to search my themes completely): A
 test if $is_login is true:

 $url_parts = parse_url( $_SERVER['REQUEST_URI'] );
 $path_parts = pathinfo( $url_parts['path'] );
 $dir_parts = explode( "/", $path_parts['dirname'] );
 $dirname = end($dir_parts);
 $filename = $path_parts['basename'];
         $is_login = 'wp-login.php' == $filename;

 I hope that helps to give some insights of what i meant. Thanks.

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


More information about the wp-trac mailing list