Private Pages as Root Page for CPTs

Traditionally, the Breadcrumb NavXT settings page has only allowed published/publicly visible pages be the root page for custom post types. This follows what WordPress core does with the homepage and posts page. However, in some circumstances, having a private page be the root page for a custom post type makes sense.

Introduced in Breadcrumb NavXT 7.4, the bcn_admin_post_root_args filter allows for control over the arguments passed into the root page drop down. Below is an example of using the bcn_admin_post_root_args filter to allow private pages to show up in the root page drop down:

add_filter('bcn_admin_post_root_args', 'my_bcn_admin_post_root_args', 10, 2);
function my_bcn_admin_post_root_args($args, $post_type_name)
{
	$args['post_status'] = array('publish','private');
	return $args;
}

This can be extended to only allow private pages to be the root page for specific post types (by checking the $post_type_name parameter for the desired post type). Lastly, while the setting is for the root page, it does not have to be limited to the page post type.

-John Havlik

Breadcrumb NavXT 7.4.0

Holy incremental improvements Batman! This second feature release of 2024 introduces the bcn_admin_post_root_args filter. This filter adds the ability to modify the arguments passed into wp_dropdown_pages() for the root page selection for the posts in the Breadcrumb NavXT settings page.

On the bugfix front, the cause of the “Function _load_textdomain_just_in_time was called incorrectly” notice in WordPress 6.7 was fixed. Additionally, two bugs relating to breadcrumb trail generation on the home page when in the loop and when using the Breadcrumb Trail block in the block theme editor. Speaking of the Breadcrumb Trail block, two typos in two of the strings in the Breadcrumb Trail block were fixed. Lastly, bcn_breadcrumb_trail::post_hierarchy() was improved to be more resilient to unexpected returns from get_post().

Lastly, as a final reminder, in the next release of Breadcrumb NavXT (7.5.0) the bcn_breadcrumb::title_trim function will be removed. This is in alignment with the deprecation schedule for the title_trim function outlined back in 2021.

-John Havlik

Breadcrumb NavXT 7.3.0

Holy revamped block Batman! Introduced originally in 6.3.0, the Breadcrumb Trail block has been rewritten in 7.3.0 to have feature parity with the Breadcrumb NavXT widget. This includes the ability to set the breadcrumb output order, output format, and whether or not the breadcrumbs are linked. Additionally, basic styling support via the editor was added.

On the bugfix front, the settings export/import function was updated to fix issues with handling boolean settings. Previously, if a boolean had a default value of ‘true’ it’s value would get lost in the export/import process. The recently introduced $outer_template parameter for the bcn_display() functions now actually works (it accidentally was dropped). display_json_ld() now produces unescaped Unicode JSON, which is easier to read (and given JSON is supposed to be Unicode text, escaping Unicode didn’t make sense). Lastly, a couple of data sanity checks are performed to reduce PHP warnings and errors when 3rd party code breaks the WordPress API.

-John Havlik

Breadcrumb NavXT Premium Extensions 2024 Update Sweep

Due to some changes in Breadcrumb NavXT 7.3, an update to all of the premium extensions is required before updating to Breadcrumb NavXT 7.3. A selection of premium extensions have already been updated and had separate release announcements (as additional features or bugs were fixed in them). This announcement covers the rest of the premium extensions.

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). If you run into any issues, please open a support ticket.

-John Havlik