Breadcrumb NavXT 5.0.1

This is the first bug fix release of the 5.0 branch of Breadcrumb NavXT. There were several issues reported with the 5.0.0 release and most have been fixed in this release. An issue where the bcn_display_list() produced duplicate code attributes in the output. The settings page tabs’ style has been adjusted to fit better with WordPress 3.8’s reskinned admin area. Additionally, users will be warned if their settings will be overridden by a BCN_SETTINGS_* define. Finally, a few issues in the uninstaller caused by the change in plugin structure were fixed.

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]

Controlling Breadcrumb NavXT Settings From the Network Settings Page

Update 2015-10-30: Updated to reflect the default behavior change in Breadcrumb NavXT 5.3.

Starting with Breadcrumb NavXT 5.0, the oft-requested feature for a Network Settings Page for controlling the setting on all subsites in a WordPress multisite setup is now available. Since now there will be a combination of Network Settings and sub site settings, some extra intelligence is needed to pick settings appropriately. Given that the desired behavior will vary depending on use case, a few new globals have been added to switch between settings behavior modes.

Force Network Settings on All Sites (default behavior for 5.0-5.2)

Versions 5.0 through 5.2 used this mode as the default behavior for settings. In this mode, rather than default to the individual site settings (as they were the only ones that existed in WordPress multisite setups prior to Breadcrumb NavXT 5.0). Note, for 5.0 through 5.2, that all other BCN_* defines must be either not set or set to false to select this mode. Note that in 5.0.1 and later you should manually specify this mode:

define('BCN_SETTINGS_USE_NETWORK', true);

Force Individual Site Settings Only (pre-5.0 behavior, default behavior for 5.3+)

In 5.3 the default behavior was reverted to the pre-5.0 behavior of using only the individual sub site settings for Breadcrumb NavXT in a WordPress Multisite setup. Note, for 5.3 and later, that all other BCN_* defines must be either not set or set to false to select this mode. The following must be placed in your wp-config.php (or site specific plugin):

define('BCN_SETTINGS_USE_LOCAL', true);

Favor Individual Site Settings Over Network Settings

In Breadcrumb NavXT 5.0 this settings will merge the local (individual site’s) settings into the network settings (network settings are the ‘defaults’ for the wp_parse_args function). Use the following to enable this mode:

define('BCN_SETTINGS_FAVOR_LOCAL', true);

Note that the behavior of this mode is subtle and likely will look more like the local (individual site’s) settings than the network settings. In the future this mode may change slightly.

Favor Network Settings Over Individual Site Settings

In Breadcrumb NavXT 5.0 this settings will merge the network settings into the local (individual site’s) settings (local site settings are the ‘defaults’ for the wp_parse_args function). Use the following to enable this mode:

define('BCN_SETTINGS_FAVOR_NETWORK', true);

Note that the behavior of this mode is subtle and likely will look more like the network settings than the local (individual site’s) settings. In the future this mode may change slightly.

-John Havlik

[end of transmission, stay tuned]

Breadcrumb NavXT Title Trixx and Menu Magic

As promised earlier this week, I am announcing the first two Breadcrumb NavXT premium extensions today. They are Breadcrumb NavXT Title Trixx and Breadcrumb NavXT Menu Magic. Both plugins will require Breadcrumb NavXT 5.0, which will be released around the end of September/early October. Purchases will come with 1 year of free updates. Support and pricing has yet to be determined.

Breadcrumb NavXT Title Trixx

Breadcrumb NavXT Title Trixx allows users to specify a custom title for any post’s (as in any post type) breadcrumb. It features integration with All in One SEO Pack, taking the SEO title if it exists. If All in One SEO Pack is not activated on the current WordPress install, an “Alternate Title” meta box will be available on all post edit screens. The initial version of this plugin complete and will be released upon the launch of the Breadcrumb NavXT Extensions Store.

Breadcrumb NavXT Menu Magic

Breadcrumb NavXT Menu Magic allows users to specify a WordPress Menu for Breadcrumb NavXT to follow for both titles and hierarchy for resources (posts, taxonomy terms, archives, etc). If the current item is not found in the menu, Breadcrumb NavXT will fall back to its default behavior. This extension is currently in development, an initial proof of concept is functional, however a bit of work is still required. As with Breadcrumb NavXT Title Trixx, Breadcrumb NavXT Menu Magic will be available upon the launch of the Breadcrumb NavXT Extensions Store.

-John Havlik

[end of transmission, stay tuned]

How to Add li and Other Tags to Breadcrumb Templates

Since Breadcrumb NavXT 4.3.0, all settings that can contain HTML are passed through wp_kses(). With this change, only a basic set of acceptable tags and properties within tags were allowed. Naturally, this restricted users more than they were used to. The restriction wasn’t the biggest problem, the lack of a filter to allow users to add their own tags in to the allowed HTML tag list. However, with Breadcrumb NavXT 4.4, a new filter bcn_allowed_html has been introduced to fix this issue.

The default set of allowed HTML tags in Breadcrumb NavXT 4.4 consists of: <a>, <img>, <span>, <h1>, and <h2>. For the purposes of this guide, let’s assume you don’t want to use the built in bcn_display_list() function to output breadcrumbs wrapped in <li> tags. The reason you would want to do this is if you need additional properties within the tag (Breadcrumb NavXT will by default add a class but that’s it).

In Breadcrumb NavXT 4.4, adding a tag to the allowed HTML list for Breadcrumb NavXT is really easy. Just create a function with one input argument ($allowed_html in this example). Within that function append, using the HTML tag name as the array entry key, assign an array of properties that tag is allowed to have, using the property name as the array entry key and a value of true. Then add your filter function to the ‘bcn_allowed_html’ filter hook. Below is an example of this for the <li> tag with a selection of properties.

function my_bcn_allowed_html($allowed_html)
{
	$allowed_html['li'] = array(
		'title' => true,
		'class' => true,
		'id' => true,
		'dir' => true,
		'align' => true,
		'lang' => true,
		'xml:lang' => true,
		'aria-hidden' => true,
		'data-icon' => true,
		'itemref' => true,
		'itemid' => true,
		'itemprop' => true,
		'itemscope' => true,
		'itemtype' => true
	);
	return $allowed_html;
}
add_filter('bcn_allowed_html', 'my_bcn_allowed_html');

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

-John Havlik

[end of transmission, stay tuned]

WP Lynx 0.6.0

Say hello to a new, better organized, settings page. Settings are now organized by context, with many of the advanced, infrequently used settings sitting under the advanced tab. In the process of updating the settings page, the underlying plugin core was updated to the latest mtekk_adminKit, which already ships with Breadcrumb NavXT.

Additionally, WP Lynx now supports capturing a screenshot of a website and using that as the thumbnail image. This is provided though Snapito!, you’ll need to grab an API key for it to work. Note that the site screenshot will always be the second image in a thumbnail set, unless no other thumbnails were found. Also note that the initial loading of a screenshot may take several seconds. Please wait for the screenshot to load in the window before inserting the lynx print to ensure WP Lynx can cache the image properly.

Lastly, a few tweaks were made to the scraping engine to fix the causes of PHP notices in cases where something went wrong in retrieving a site.

Note that this releaseĀ  is the first in a series of planned releases between now and 1.0. Each will add a minor number of features, tracked in the WP Lynx GitHub Repository.

-John Havlik

[end of transmission, stay tuned]