Skip to content

Configuring Plugin Features

mgburns edited this page Mar 10, 2013 · 7 revisions

Several components of the navigation plugin can be enabled / disabled programmatically.

The current feature list:

  • manager - Navigation manager (the "Edit Order" screens) - On by default
  • widget - Content Nav widget - On by default
  • links - External links with your pages - On by default
  • primary - Primary navigation settings - Off by default (requires theme support)

Disabling Plugin Features

If your install does not require one or more of these built-in features, they can be disabled by adding a constant to your wp-config.php or theme's function.php file:

<?php
define( 'BU_NAVIGATION_SUPPORTS_<all caps feature slug>', false );

For example, to disable the "Edit Order" screens for hierarchical post types, you could add the following:

<?php
define( 'BU_NAVIGATION_SUPPORTS_MANAGER', false );

These constants are best placed in your wp-config.php file, where they will take affect install-wide. To enable features for specific themes, there is a better option.

Using the Theme Features API

Theme authors may wish to register support for navigation plugin features that are off by default or require theme participation. The most common use case is to support the primary navigation settings screen.

Add the following line to your theme's functions.php file:

<?php
add_theme_support( 'bu-navigation-primary' ); 

For more information see Adding Theme Support for Primary Navigation Menus

Clone this wiki locally