GSoC/GCI Archive
Google Code-in 2010 WordPress

Allow menu items to be manually selected or deselected

completed by: chalet16

mentors: Aaron D. Campbell

As I started upgrading sites to use WP Menus I came across a serious limitation.  Basically, we need to be able to set up certain menu items as "pseudo-parents" for various pages. For example, on a tag page (Negotiation Skills) should select "Glossary" in the menu. In this case "Glossary" is a page, so WP doesn't see any reason to select it when a user is on a tag page.


It would be nice to add a filter and possibly some extra code to make it possible to code in these kind of manual relationships.  The current ticket (#15777) has a quick and dirty patch, but it only allows you to force an item to be selected (and only in certain situations) and no way to force an item to NOT be selected.  We need the ability to do both, and still have the system handle the parent and ancestors of the item.