[wp-trac] [WordPress Trac] #32221: Custom nav menu items are scheme-sensitive

WordPress Trac noreply at wordpress.org
Tue Jul 7 05:49:16 UTC 2015


#32221: Custom nav menu items are scheme-sensitive
-------------------------------------------------+-------------------------
 Reporter:  dd32                                 |       Owner:  dd32
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  4.3
Component:  Menus                                |     Version:  3.0
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch needs-      |     Focuses:
  testing dev-feedback                           |
-------------------------------------------------+-------------------------
Changes (by dd32):

 * owner:  McGuive7 => dd32
 * status:  assigned => accepted


Comment:

 > I also noticed that the current-menu-item check fails for custom menu
 links if any parameters are appended to the URL (e.g.
 http://mysite.com/?foo=bar)

 I think this is deliberate.

 Take for example the following url's:
 - http://example.com/
 - http://example.com/?p=1
 - http://example.com/?page_id=5
 All of those should be able to be in a menu and not highlight the others
 items.

 I can understand that however you'd want the following to highlight:
 - http://example.com/page-name/
 - http://example.com/page-name/?foo-bar
 However, what's to say that those have the same content? maybe they should
 be different menu items too?

 I guess it's those hard questions which lead to that case not being
 handled, but there are filters in place to allow that sort of thing..

 For that reason [attachment:32221.2.patch 32221.2.patch] by
 @marsjaninzmarsa looks like it's the best way to go here, but I'll do some
 testing and get something in soon.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32221#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list