[wp-trac] [WordPress Trac] #18144: Update wp_nav_menu to support relative URLs

WordPress Trac wp-trac at lists.automattic.com
Sun Jul 17 00:27:01 UTC 2011


#18144: Update wp_nav_menu to support relative URLs
-------------------------+-----------------------------
 Reporter:  parisholley  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Template     |    Version:  3.2.1
 Severity:  minor        |   Keywords:
-------------------------+-----------------------------
 in wp-includes/nav-menu-template.php add:

 {{{
 363: $relative_url = untrailingslashit($_SERVER['REQUEST_URI']);
 }}}

 modify the in_array check to add that as an option

 {{{
 if ( in_array( $item_url, array( $current_url, $_indexless_current,
 $relative_url ) ) )
 }}}


 I encourage clients to use relative url's so they can test with navigation
 across environments regardless of domains.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18144>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list