Breadcrumb NavXT Polylang Extensions 1.0.0

Introducing Breadcrumb NavXT Polylang Extensions. This plugin improves Breadcrumb NavXT’s support for Polylang, at plugin that facilities multi-lingual content on WordPress based sites.

While Breadcrumb NavXT mostly works with Polylang, the deficiencies outlined in Breadcrumb NavXT and WPML Compatibility apply to compatibility with Polylang as well. With Breadcrumb NavXT Polylang Extensions, string based settings within Breadcrumb NavXT and Custom Post Type root pages are translatable within Polylang.

Features

  • Automatically links to the correct Custom Post Type “root page” for the current language
  • Makes Breadcrumb NavXT settings that are strings available for translation via Polylang
  • Improves Breadcrumb NavXT widget’s Polylang compatibility

-John Havlik

[end of transmission, stay tuned]

How to Remove post_type From Breadcrumb NavXT URLs

Beginning with Breadcrumb NavXT 5.3.0, post type archive support was enhanced with the addition of the post_type query argument under various circumstances. Usually, this occurs when the post type is not the primary post type for the taxonomy (e.g. it is not the first post type in the object_type array for the taxonomy), or for date archives. While this is arguably the correct behavior, it is not right for every circumstance.

Breadcrumb NavXT 5.4.0 introduces a new filter, bcn_add_post_type_arg, which furnishes the ability to override the decision on when to include the post_type query argument. This article covers the basic usage of this filter, along with some hints for more advanced uses.

Basic Code

The most basic code, listed below, disables adding the post_type query argument for all resources.

add_filter('bcn_add_post_type_arg', 'my_add_post_type_arg_filt', 10, 3);
function my_add_post_type_arg_filt($add_query_arg, $type, $taxonomy)
{
return false;
}

To get started quickly, just copy and paste the above code into a site specific plugin and start playing.

Hints for (More) Advanced Uses

From the basic code above, notice that there are three parameters passed into the filter. The first is the decision Breadcrumb NavXT was going to make in regards to adding the post_type query argument. The second is the name of the post type that is under consideration for addition to the URL. Lastly, the third parameter is the name of the taxonomy, if applicable, for the archive the URL points to. With this information, more complex filtering/decision making can be achieved.

For example, it is possible to enable the post_type query argument for only specific post types, or for specific taxonomy archives. Or, the post_type query argument can be enabled for all but a specific post type or taxonomy. All it takes is a little conditional logic that looks at the second and third parameters of the filter function.

-John Havlik

[end of transmission, stay tuned]

Breadcrumb NavXT WPML Extensions 1.1.0

Announcing the immediate availability of Breadcrumb NavXT WPML Extensions 1.1.0. This version switches to the WPML 3.2+ API for translating strings. Backwards compatibility with WPML 3.1 (and older) is maintained. However, users of other plugins (Polylang) that provide emulations of the WPML API may no longer work. Speaking of which, Polylang will get its own extension in early 2016. Additionally, a bug that prevented updated setting strings from Breadcrumb NavXT from showing up in the string translation screen on non-multisite installs in a timely matter.

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

[end of transmission, stay tuned]

Breadcrumb NavXT 5.3.1

This is the first, and hopefully only, bug fix release of the 5.3 branch of Breadcrumb NavXT. Three bugs were mercilessly squashed in this release. These bugs were: a bug that occurred when upgrading settings, a bug that caused a PHP error when the post_type query variable was an array, and an issue with alignment of the settings page content on WordPress 4.4.

In previous versions, a bug in the options migration script prevented new CPTs and custom taxonomies settings, or settings added by extension plugins from being instantiated properly. This manifested itself as undefined index PHP warnings/errors.

In instances where the post_query query variable is an array (set by another plugin), previous versions of Breadcrumb NavXT would throw PHP errors. bcn_breadcrumb_trail::get_type_string_query_var() has been updated to return the default type string when the post_query variable is an array.

Lastly, WordPress 4.4 introduced a slight styling bug in the settings page. In this bug, the content under the settings tabs would be misaligned (fall off to the right edge of the screen). This release introduces a fix to this bug.

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 Multidimension Extensions 2.0.0

It was not too long ago the last release was announced, and now a new version of Breadcrumb NavXT Multidimension Extensions is available. Breadcrumb NavXT Multidimension Extensions 2.0.0 adds three new features; two new filters and one setting.

The two new filters, bcn_multidim_term_children and bcn_multidim_post_children, are in response to a need to filter the taxonomy terms and posts (pages) included in the second dimension of the breadcrumb trail. They filter the arguments string passed into wp_list_categories() and wp_list_pages() respectively. See the Breadcrumb NavXT Multidimension Extensions Filter Reference for more details on these two filters.

Additionally, a setting was added to control the display of the second dimension breadcrumbs of the home breadcrumb when on the home page. This only applies to when children are displayed in the second dimension (either via the widget, or calling bcn_display_list_multidim_children()). This setting is available on the Breadcrumb NavXT settings page under the Extensions tab.

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

-John Havlik

[end of transmission, stay tuned]