Using the bcn_manage_options Capability

Since version 6.5.0, Breadcrumb NavXT uses the custom capability bcn_manage_options to grant access to, and allow updating settings on the Breadcrumb NavXT settings page. By default, Breadcrumb NavXT tries to add this capability to the administrator role. However, some setups do not have an administrator role, and require the bcn_manage_options capability to be assigned to the appropriate role on that site.

The following code, when placed in a site specific plugin, adds the bcn_manage_options to the role ROLE:

function my_bcn_manage_options_cap_adder()
{
    $role = get_role('ROLE');
    if($role instanceof \WP_Role && !role->has_cap('bcn_manage_options')
    {
        $role->add_cap('bcn_manage_options');
    }
}
add_action('admin_init', 'my_bcn_manage_options_cap_adder');

Simply swap ROLE for the name of the role that needs access to the Breadcrumb NavXT Settings page.

-John Havlik

Breadcrumb NavXT 7.0.2

This is the second, and hopefully last, bug fix release of the 7.0 branch of Breadcrumb NavXT. In this release, the “Sorry, you are not allowed to access this page.” message when attempting to visit the Breadcrumb NavXT settings page has been fixed for the majority of users. Additionally, the behavior of the default setting instantiation was changed to allow bcn_settings_init to set the value of the following settings:

  • Hhome_template, Hhome_template_unlinked, hseparator, and hseparator_higher_dim.
  • The permissions bug was due to the introduction of namespacing in adminKit 3.0, which caused a check against WP_Role to always return false (since it was looking in the wrong namespace), resulting in the bcn_manage_options capability never getting assigned to the administrator role. Note that this primarily affected sites that never had Breadcrumb NavXT 6.5.0 or 6.6.0 installed (i.e. new installs or updating from a version prior to 6.5.0). If your WordPress install does not have an administrator role, you will need to add the bcn_manage_options capability to the appropriate role in your install.

    As always, you can grab the latest version of Breadcrumb NavXT from the Breadcrumb NavXT page.

    -John Havlik