Breadcrumb NavXT Multidimension Extensions 2.5.0

Announcing the immediate availability of Breadcrumb NavXT Multidimension Extensions 2.5.0. The single new feature in this version is support for Breadcrumb NavXT 6.0. As there are breaking changes in Breadcrumb NavXT 6.0, this version supports both Breadcrumb NavXT 5.x and 6.x branches. Please update this extension before updating Breadcrumb NavXT to 6.0.

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

-John Havlik

[end of transmission, stay tuned]

Changes to Note Before Upgrading to Breadcrumb NavXT 6.0

Breadcrumb NavXT 6.0 is now in the feature freeze phase of development. At this point, it is necessary to disclose the changes in Breadcrumb NavXT 6.0 that will require the attention of users and developers.

Unlike a typical release, quite a bit has changed under the hood in this release, hence the bump up from 5.7 to 6.0. Development for 6.0 focused heavily on reworking the bcn_breadcrumb_trail class. This rework impacts some extension plugins to Breadcrumb NavXT. If you have written custom code extending Breadcrumb NavXT, please see the deprecations section for functions and filters that have been deprecated in Breadcrumb NavXT 6.0.0.

Impacted Extensions

Over the next several weeks, leading up to the Breadcrumb NavXT 6.0 release, the following plugins will receive updates to support Breadcrumb NavXT 6.0. If a plugin listed below is in use on your site, please update to the version listed below before updating to Breadcrumb NavT 6.0.

Breadcrumb NavXT Menu Magic

Before upgrading the Breadcrumb NavXT 6.0.0, please upgrade Breadcrumb NavXT Menu Magic to 1.5 or newer. Failing to do so will result in PHP errors being thrown.

Breadcrumb NavXT Multidimension Extensions

Before upgrading the Breadcrumb NavXT 6.0.0, please upgrade Breadcrumb NavXT Multidimension Extensions to 2.5 or newer. Failing to do so will result in PHP errors being thrown.

Requires PHP5.4 and WordPress 4.6

Breadcrumb NavXT 6.0.0 officially bumps the required PHP version to PHP5.4 or newer. It is nearly impossible to test on PHP5.4 now, so support has to be dropped. Likewise, WordPress 4.6 or newer is now required for Breadcrumb NavXT 6.0.0.

Deprecations

As part of a major refactoring of the bcn_breadcrumb_trail class, several functions were deprecated, and a couple were removed. Additionally, one filter was deprecated as part of this refactoring effort.

bcn_breadcrumb_trail::display_list()

The display() function within bcn_breadcrumb_trail was refactored to be more generic, including a new $template parameter, as a result display_list() has been deprecated. This function was deprecated in Breadcrumb NavXT 6.0.0, however it still exists as a wrapper to the proper call to display() including the requisite template.

bcn_breadcrumb_trail::do_front_page()

There was substantial overlap in functionality between do_front_page() and do_home(). As a result, do_home() was made more generic and do_front_page() was removed from Breadcrumb NavXT 6.0.0.

bcn_breadcrumb_trail::find_type()

This was an auxiliary function to do_root() that determined the post type to use for the root. Since do_root() was refactored such that it no longer determines state, this function was removed in Breadcrumb NavXT 6.0.0.

bcn_breadcrumb_trail::do_attachment()

In refactoring do_post(), the functionality that was special to do_attachment() was absorbed into do_post(). These two functions were very similar in previous releases and it was a natural target for refactoring. This function was deprecated in Breadcrumb NavXT 6.0.0, however it still exists as a wrapper to the proper call to do_post().

bcn_breadcrumb_trail::do_archive_by_date()

In the refactoring effort to remove state determination logic from the lower level functions, this function’s behavior was split out into three functions: do_day(), do_month(), and do_year(). Internally, Breadcrumb NavXT now calls a combination of these three functions as needed. This function was deprecated in Breadcrumb NavXT 6.0.0, however it still exists as a wrapper to the proper call to do_day(), do_month(), and do_year().

bcn_li_attributes

As part of deprecating bcn_breadcrumb_trail::display_list(), the bcn_li_attributes filter has been deprecated in Breadcrumb NavXT 6.0.0. Replacing it is the new bcn_display_attributes filter.

-John Havlik

[end of transmission, stay tuned]

Breadcrumb NavXT and WooCommerce Compatibility Tips

In general, Breadcrumb NavXT, due to its use of the WordPress API, is compatible with other plugins such as WooCommerce. Occasionally, this is not enough and additional code is required for proper functionality. Other times, as with WooCommerce, proper settings configuration is sufficient.

What You Need

These are the plugins and versions used when performing the testing reported on within this article:

  • WooCommerce – At the time this article was written, 3.1.0 was the latest available version and was the version tested against.
  • Breadcrumb NavXT – Tested against a development release of 5.7.1.

What Works

Since WooCommerce is relatively well behaved, Breadcrumb NavXT can easily generate the expected breadcrumb trail for WooCommerce resources. However, depending on how WooCommerce is setup, Breadcrumb NavXT may need a couple of settings to be changed. In general, the following settings changes are recommended for WooCommerce users:

  • Ensure that the “Products Root Page” in the Breadcrumb NavXT settings page (Settings > Breadcrumb NavXT > Post Types) is set to the same page as the “Shop page” setting in WooCommerce (WooCommerce > Settings > Products > Display).
  • Ensure that “Product Archive Display” is unchecked.
  • Ensure that “Product Hierarchy Display” is checked.

Other Notes

One thing to keep in mind: when changing the “Shop page” in WooCommerce, the “Products Root Page” in Breadcrumb NavXT will likely need to be changed as well. Otherwise, the Products page in the breadcrumb trail will not match the WooCommerce shop page.

-John Havlik

[end of transmission, stay tuned]

Making Sense of the *title Breadcrumb Template Tags

Currently, there are several, closely related template tags that each exhibit slightly different behaviors. These are: %title%, %htitle%, %ftitle%, and %fhtitle%. As their names suggest, they will be replaced with the resource’s title. However, how this title is processed differs between the tags.

Note that the “Max Title Length” setting is deprecated. Hence, both %ftitle% and %fhtitle% are deprecated and not recommended for use. They are included in this discussion for the sake of completeness.

Below is a table outlining the behavior of these tags for the same title with the max length set to ~10 characters and with the max length setting disabled.

Template Tag Max Title Length1 Title Result
%title% 10 Hello <em>World</em> Leaders Hello <em…
%htitle% 10 Hello <em>World</em> Leaders Hello <em…
%ftitle% 10 Hello <em>World</em> Leaders Hello World Leaders
%fhtitle% 10 Hello <em>World</em> Leaders Hello <em>World</em> Leaders
%title% Disabled Hello <em>World</em> Leaders Hello World Leaders
%htitle% Disabled Hello <em>World</em> Leaders Hello <em>World</em> Leaders

%title% and %htitle%

Notice that the resulting strings for the standard %title% tag and the %ftitle% tag do not contain HTML tags. Thus, they are safe for use within HTML tag attributes (e.g. the title attribute). To maintain HTML tags present in the resource’s title, use the %htitle% tag.

%ftitle% and %fhtitle%

Note that the Max Title Length setting does not affect the resulting string for the %ftitle% and %fhtitle% template tags. In fact, by design, they are the same as %title% and %htitle% when “Max Title Length” is disabled. However, note that since the Max Title Length setting is deprecated, these template tags are as well.

Lastly, note that when using the Max Title Length setting, HTML tags may be left open or even incomplete. Therefore, it is strongly recommended that CSS is used to trim the breadcrumb title length rather than the deprecated Max Title Length setting. An additional benefit to using CSS is it does not mess with the actual content of the breadcrumb trail, allowing search engines to pick up on the full titles rather than the trimmed ones.

-John Havlik

[end of transmission, stay tuned]

Notes:

  1. Note that use of the Max title Length setting has been deprecated in favor of using CSS to trim Breadcrumb titles lengths.

Breadcrumb NavXT Menu Magic 1.1.5

Announcing the immediate availability of Breadcrumb NavXT Menu Magic 1.1.5. This version fixes a bug relating to Breadcrumb NavXT Menu Magic’s handling of CPT root pages.

Previously, if a CPT root page was located in a menu, the menu hierarchy would only be followed when on said CPT root page, or if said root page had a parent page that is not the front page. This normally manifested itself when on a single post instance of a CPT, the menu hierarchy containing the CPT root page would not be followed. With version 1.1.5, Breadcrumb NavXT Menu Magic will always follow the menu hierarchy that a CPT root page is in.

Users with valid and activated license keys should receive an update notification within the WordPress dashboard and be able to use the update mechanism to update (just like with any plugin in the WordPress.org repository).

-John Havlik