Breadcrumb NavXT 6.5.0

Holy taxonomy jumping Batman! This first feature release of 2020 changes the way taxonomies are handled when passing from function to function. Now, it is possible to change the taxonomy, in addition to the term, used for a post’s hierarchy using the bcn_pick_post_term filter. Additionally, the bcn_breadcrumb_linked filter was added to allow manipulation of the breadcrumb’s linked state. On the administration interface front, a new capability was introduced, bcn_manage_options. Lastly, a bug was fixed in the settings exporter that caused it to generate non-importable settings files when certain HTML entities were present in a setting.

bcn_breadcrumb_linked Filter

In Breadcrumb NavXT 6.4.0, the way URLs and the linked state for individual breadcrumbs changed. This was to facilitate the ability to place the %link% tag in unlinked breadcrumb templates. As part of this bcn_breadcrumb::set_linked() was introduced. To allow users to control the behavior of this function, the bcn_breadcrumb_linked filter was added in 6.5.0.

bcn_manage_options Capability

Up until Breadcrumb NavXT 6.5.0, the manage_options capability was used to gate access to the Breadcrumb NavXT settings page. While this did insure the proper level of authority for modifying settings, it did not allow flexibility to add the ability to mange just the Breadcrumb NavXT settings to a role. Thus, in 6.5.0, the bcn_manage_options capability was added. By default this capability is added to the administrator role.

-John Havlik

Breadcrumb NavXT 6.4.0

Holy incremental improvements Batman! This second feature release of 2019 changes the way private posts and non-hierarchical taxonomies are handled. As part of these changes, a new filter was added bcn_show_post_private. Additionally, the %link% template tag is now allowed in the “unlinked” breadcrumb templates. Lastly, how the Media post type settings are handles changed. Previously, it was referred to as “Attachments” within the Breadcrumb NavXT settings page. Now, this post type is referred to by its actual name (Media) and additional settings are available for it in the settings page.

bcn_show_post_private Filter

Beginning in 6.4.0, the default behavior for private posts has changed. If a parent of a post has the published status of private, it no longer will be included in the breadcrumb trail (Breadcrumb NavXT will skip over it). While this was deemed the most appropriate behavior, some users may want the old behavior. To facilitate that, the bcn_show_post_private filter was added in 6.4.0.

bcn_show_type_term_archive Filter

Since 3.9.0, Breadcrumb NavXT has attempted to associate a taxonomy with a post type to include the type archive in the breadcrumb trail. This was not controllable (if the post type had an archive and it was enabled in the settings for that post type, it would show up in the breadcrumb trails for associated taxonomy terms). To allow users to control this behavior, the bcn_show_type_term_archive filter was added in 6.4.0.

Non-Hierarchical Taxonomies

Previously, the use of non-hierarchical taxonomies as the parent for posts was handled in a very different manner than hierarchical taxonomies. This is quite hacky, and incompatible with the newer bcn_display_json_ld() function. To resolve some of these incompatibilities, when a post has onl only a single non-hierarchical term, the hierarchical term codepath will be used. This will result in the same breadcrumb trial being produced, however, it will no longer cause issues with bcn_display_json_ld.

-John Havlik

Breadcrumb NavXT 6.3.0

Holy Gutenberg breadcrumb trail block Batman! Originally scheduled for inclusion in Breadcrumb NavXT 6.2, the Breadcrumb Trail Gutenberg Block finally makes an appearance in 6.3. Additionally, changes were made to improve accessibility standards support (both in the settings page and in the breadcrumb trail). Lastly, a bug that caused a PHP error in bcn_breadcrumb_trail::fill() has been fixed.

bcn_display_attribute_array Filter

Back in 6.0, the bcn_display_attributes filter was added to replace the old bcn_li_attributes filter. This was little more than a name change for the filter. Unfortunately, neither filter is easy to use—both require string processing. As an alternative, easier to use filter, bcn_display_attribute_array was added to Breadcrumb NavXT 6.3. This filter works against a key-value pair array of the attributes.

bcn-aria-current Template Tag

To facilitate WAI-ARIA Breadcrumb support, a new template tag was added in 6.3. Unlike the other template tags that start and end with %, this template tag is simply bcn-aria-current. This tag is replaced with aria-current="page" when the breadcrumb represents the current page, otherwise it is replaced with an empty string.

As always, you can grab the latest version of Breadcrumb NavXT from the Breadcrumb NavXT page. If you experience any issues with this version of Breadcrumb NavXT, please leave a comment on this post detailing the issue.

Tagged:
Updated:

Breadcrumb NavXT 6.2.1

This is the first, and hopefully only, bug fix release of the 6.2 branch of Breadcrumb NavXT. One bug was fixed in this release. In 6.2.0 changes introduced into the default settings handling code for Custom Post Types contained a bug relating to the handling of hierarchical CPTs. This bug manifested itself as PHP warnings on the frontend, on the settings page, and as “the following settings were not saved” messages in the settings page.

Additionally, the default template for unlinked breadcrumbs has been modified to include a span element wrapping the title. This makes the markup of the individual breadcrumbs consistent in that they are wrapped in a span element.

As always, you can grab the latest version of Breadcrumb NavXT from the Breadcrumb NavXT page. If you experience any issues with this version of Breadcrumb NavXT, please leave a comment on this post detailing the issue.

-John Havlik

[end of transmission, stay tuned]

Breadcrumb NavXT 6.2.0

Holy pre-Gutenberg Block introduction release Batman! Originally, 6.2 was to contain a Gutenberg Block, however it did not make the release. New in 6.2 are two filters (bcn_register_rest_endpoint and bcn_breadcrumb_assemble_json_ld_array), and support for following a primary (post parent hierarchy) and then secondary hierarchy (specified in the Hierarchy option for the post type).

A few bug fixes were included in this release. A bug preventing the settings reset option under the help drop down from working was fixed. A cause of PHP warnings to show up on the custom post type and custom taxonomy settings immediately after upgrading/migrating the settings to a new version was fixed.

Several behavior changes were made in this release. The biggest involves the REST API endpoints no longer being enabled by default. Additionally, the default templates were changed for two reasons. The first was to simplify and clarify the translatable content. The second was to improve Schema.org BreadcrumbList compatibility. As part of these changes, the default unlinked breadcrumb templates no longer contain span elements, or any Schema.org BreadcrumbList markup. This fixes an issue seen in the Google Structured Data Testing Tool.

REST API Changes

As introduced in 6.1, the REST API was enabled by default. In 6.2, this changes. Now, individual Breadcrumb NavXT REST API endpoints must be requested via the newly introduced bcn_register_rest_endpoint filter. This provides a method for plugins using the Breadcrumb NavXT REST API to request and expose only the endpoints that are needed. Note that the BCN_DISABLE_REST_API constant can still disable the Breadcrumb NavXT REST API and takes priority over the new filter.

These changes were made in an effort to decrease the attack surface of Breadcrumb NavXT and were prompted by concerns raised by Janek Vind. Previously, the author endpoint could be used to find usernames based on user ID if the display name was kept as the username. While WordPress itself will make this information available, some users employ methods to prevent WordPress from making this information public. Hence, changes were made to the default behavior in Breadcrumb NavXT

Primary/Secondary Hierarchy

This newly introduced option for post types (except pages), allows for hierarchies that start with the post parent and once that hierarchy has been exhausted follows the post hierarchy option. This allows attachment like behavior for custom post types.

As always, you can grab the latest version of Breadcrumb NavXT from the Breadcrumb NavXT page. If you experience any issues with this version of Breadcrumb NavXT, please leave a comment on this post detailing the issue.

-John Havlik

[end of transmission, stay tuned]