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

    Breadcrumb NavXT 7.0.1

    This is the first, and hopefully only, bug fix release of the 7.0 branch of Breadcrumb NavXT. This release features fixes to 4 bugs and 2 behavior changes for better resiliency to non-supported environments. As part of this, two different settings errors have been fixed/handled more gracefully (the get_value on string error and the int required string given error). A few tweaks were made to hopefully support PHP5.6 without error (this is untested so the minimum listed PHP requirement stays at 7.0). Additionally, the run level for the default settings generation was moved from 11 to 9000, this should avoid errors in the settings page caused by other plugins registering post types at priorities other than the default 10.

    Lastly, in order to work around issues with 3rd party code that is not 7.0 compatible, the location that the bcn_settings_init filter is applied has been moved to the top of the setup_setting_defaults function. With this new location, 3rd party code can still add settings, however the default settings can no longer be modified.

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

    -John Havlik

    Breadcrumb NavXT 7.0.0

    Holy under-the-hood improvements Batman! This release feature a heavy reworking of the code that powers the administrative interface. While there isn’t much to show for it right now, the ground work has been laid to revamp how the settings importing/exporting works. Additionally, the core breadcrumb trail class now supports multidimensional breadcrumb trails. Note that this doesn’t mean it generates them, internally, it allows non-hierarchical terms to be handled more gracefully. On top of the under-the-hood changes, several bugs were fixed in this release.

    PHP8 compatibility has been improved (the REST controller no longer throws an error). Widget settings not saving/taking effect in WordPress 5.8+ has been fixed as well. Lastly, an error in how the position count worked was fixed for when the output order of the trail is set to reverse.

    Internally, the way settings work has changed significantly. Rather than saving the entire set of setting values to the database, only non-default values are now saved. As part of this, a new filter, the bcn_opts_update_to_save filter was added to allow control of the non-default values before saving. The change in what is saved to the database helps with future updates, allowing sites that use the default value for a setting to keep up with the latest settings changes without having to manually make changes.

    Lastly, a few notes on potential messages and behaviors that may be seen. Immediately after migrating settings on the Breadcrumb NavXT settings page, you may see a notice about unknown settings. Under normal circumstances, this will disappear after re-loading the page. It is a result of the settings updater removing old settings from the database (since only non-default values are now saved). Additionally, if the labels for the settings tabs are missing, it is likely that you are also running WP Lynx, or some other plugin that uses an old version of adminKit. At this point of time, you’ll have to either update those plugins, or deactivate them. Finally, if you use any of the Breadcrumb NavXT extension plugins, you should update these plugins prior to updating to Breadcrumb NavXT 7.0.

    -John Havlik

    Breadcrumb NavXT Multidimension Extensions 2.7.0

    Announcing the immediate availability of Breadcrumb NavXT Multidimension Extensions 2.7.0. This is a preliminary release to introduce support for Breadcrumb NavXT 7.0. Attempting to use prior versions of Multidimension Extensions with Breadcrumb NavXT 7.0 will result in PHP errors, so it s recommended that you update Multidimesnion Extensions before updating to Breadcrumb NavXT 7.0.

    You can grab Breadcrumb NavXT Multidimension Extensions from the WordPress.org plugin repository.

    -John Havlik