-
Notifications
You must be signed in to change notification settings - Fork 7
Configuring Plugin Features
Several components of the navigation plugin can be enabled / disabled programmatically.
The current feature list includes:
Feature | Description | Default |
---|---|---|
manager | Navigation manager (the "Edit Order" screens) | On |
widget | Content Nav widget | On |
links | Include external navigation links with page menus | On |
primary | Primary navigation settings screen | Off |
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.
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