dev-master
9999999-dev
The Requires
1.1.1
1.1.1.0
The Requires
1.1.0.1
1.1.0.1
The Requires
1.1.0
1.1.0.0
The Requires
Posted in case anyone finds it useful. This is definitely a scratch your own niche (get it??) kind of plugin., (*1)
Basically, if you have a multisite and you want to create a global menu with some or all of your subsites and show which subsite you're on, this will help you build that menu., (*2)
To use it, Network Activate it and then go to Settings -> Network Menu., (*3)
You'll see a list of your subsites, with a checkbox to enable or disable that subsite in the menu. There is also a field to set the menu label., (*4)
Once you've configured it, just drop this somewhere:, (*5)
wp_nav_menu( array('menu' => 'network_subsite_menu') );
In reality, the plugin doesn't really use wp_nav_menu
, so you're going to be pretty dissappointed if you try to pass other options. It's building out the menu manually, using the standard WordPress nav menu HTML and then circumventing the whole nav menu function by directly returning the output., (*6)
The only parameter that will work is echo
., (*7)
If you need anything beyond the basics, these filters should get you there in theory:, (*8)
Filter the whole settings object. You could change the order of menu items here., (*9)
Lets you insert menu items before the main menu item loop., (*10)
Lets you insert menu items after the main menu item loop., (*11)
Filter the url, label, and set whether or not the current menu item is the current one., (*12)
To see how these actually work, look at the code dawg., (*13)