Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Working on a site of mine I was wondering if it would be possible to set/limit the amount of menus someone can make to '1' (and thereby disabling the current menu location features)?

I've been looking at nav-menus.php and have noticed

$nav_menus = wp_get_nav_menus( array('orderby' => 'name') );
$menu_count = count( $nav_menus );

and know I am probably looking for a way to filter wp_get_nav_menus, but I'm not entirely sure if this would be the best way, or how to do this best.

Could someone perhaps assist me with this?

share|improve this question
    
Why? The theme controls the menu locations so if the theme supports one location, only one menu will work no matter how many are created in the backend. –  s_ha_dum Oct 6 '13 at 17:20
    
That's somewhat the reason why I've been asked. People get confused seeing the option to create multiple menus (of which they can only use one at the time), and having just a single location. Now I can explain them (which I have), but since it's also not used I prefer removing it to a bare minimal set of options. –  Cor van Noorloos Oct 6 '13 at 17:31
    
Maybe someone is more familiar with this subsystem than me but I took a look around the source my feeling is that you are in for something a lot more painful than explaining how menus work. :) –  s_ha_dum Oct 6 '13 at 17:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.