Version Description
- Bug fix: Added additional checks for empty URLs and templates within
bcn_breadcrumb
to prevent various bugs when empty URLs and/or templates are passed in. - Bug fix: Move away from building URLs for search breadcrumbs and instead using
get_search_link()
to fix support for pretty permalinks. - Bug fix: Fixed issue where media items (attachments) that have not been attached to a post yet would cause an incorrect breadcrumb trail to be generated.
- Bug fix: Fixed issue where attachments of the front page would cause PHP Warnings.
- Bug fix: Fixed issue where attachments of the front page would have duplicate breadcrumbs for the home page.
- Bug fix: Fixed issue where attachments of pages would have an extraneous breadcrumb relating to the page for posts.
- Bug fix: Fixed issue with the text domain/domain path in the plugin header.
Download this release
Release Info
Developer | mtekk |
Plugin | Breadcrumb NavXT |
Version | 5.2.1 |
Comparing to | |
See all releases |
Code changes from version 5.2.0 to 5.2.1
- breadcrumb-navxt.php +4 -4
- class.bcn_admin.php +1 -1
- class.bcn_breadcrumb.php +6 -6
- class.bcn_breadcrumb_trail.php +19 -10
- class.bcn_network_admin.php +1 -1
- class.bcn_widget.php +1 -1
- readme.txt +14 -7
breadcrumb-navxt.php
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
Plugin Name: Breadcrumb NavXT
|
4 |
Plugin URI: http://mtekk.us/code/breadcrumb-navxt/
|
5 |
Description: Adds a breadcrumb navigation showing the visitor's path to their current location. For details on how to use this plugin visit <a href="http://mtekk.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
|
6 |
-
Version: 5.2.
|
7 |
Author: John Havlik
|
8 |
Author URI: http://mtekk.us/
|
9 |
License: GPL2
|
10 |
-
|
11 |
-
|
12 |
*/
|
13 |
/* Copyright 2007-2015 John Havlik (email : john.havlik@mtekk.us)
|
14 |
|
@@ -60,7 +60,7 @@ $breadcrumb_navxt = NULL;
|
|
60 |
//TODO change to extends mtekk_plugKit
|
61 |
class breadcrumb_navxt
|
62 |
{
|
63 |
-
const version = '5.2.
|
64 |
protected $name = 'Breadcrumb NavXT';
|
65 |
protected $identifier = 'breadcrumb-navxt';
|
66 |
protected $unique_prefix = 'bcn';
|
3 |
Plugin Name: Breadcrumb NavXT
|
4 |
Plugin URI: http://mtekk.us/code/breadcrumb-navxt/
|
5 |
Description: Adds a breadcrumb navigation showing the visitor's path to their current location. For details on how to use this plugin visit <a href="http://mtekk.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
|
6 |
+
Version: 5.2.1
|
7 |
Author: John Havlik
|
8 |
Author URI: http://mtekk.us/
|
9 |
License: GPL2
|
10 |
+
Text Domain: breadcrumb-navxt
|
11 |
+
Domain Path: /languages
|
12 |
*/
|
13 |
/* Copyright 2007-2015 John Havlik (email : john.havlik@mtekk.us)
|
14 |
|
60 |
//TODO change to extends mtekk_plugKit
|
61 |
class breadcrumb_navxt
|
62 |
{
|
63 |
+
const version = '5.2.1';
|
64 |
protected $name = 'Breadcrumb NavXT';
|
65 |
protected $identifier = 'breadcrumb-navxt';
|
66 |
protected $unique_prefix = 'bcn';
|
class.bcn_admin.php
CHANGED
@@ -42,7 +42,7 @@ if(!class_exists('mtekk_adminKit'))
|
|
42 |
*/
|
43 |
class bcn_admin extends mtekk_adminKit
|
44 |
{
|
45 |
-
const version = '5.2.
|
46 |
protected $full_name = 'Breadcrumb NavXT Settings';
|
47 |
protected $short_name = 'Breadcrumb NavXT';
|
48 |
protected $access_level = 'manage_options';
|
42 |
*/
|
43 |
class bcn_admin extends mtekk_adminKit
|
44 |
{
|
45 |
+
const version = '5.2.1';
|
46 |
protected $full_name = 'Breadcrumb NavXT Settings';
|
47 |
protected $short_name = 'Breadcrumb NavXT';
|
48 |
protected $access_level = 'manage_options';
|
class.bcn_breadcrumb.php
CHANGED
@@ -21,7 +21,7 @@ require_once(dirname(__FILE__) . '/includes/block_direct_access.php');
|
|
21 |
class bcn_breadcrumb
|
22 |
{
|
23 |
//Our member variables
|
24 |
-
const version = '5.2.
|
25 |
//The main text that will be shown
|
26 |
protected $title;
|
27 |
//The breadcrumb's template, used durring assembly
|
@@ -29,7 +29,7 @@ class bcn_breadcrumb
|
|
29 |
//The breadcrumb's no anchor template, used durring assembly when there won't be an anchor
|
30 |
protected $template_no_anchor = '%title%';
|
31 |
//Boolean, is this element linked
|
32 |
-
protected $linked;
|
33 |
//The link the breadcrumb leads to, null if $linked == false
|
34 |
protected $url;
|
35 |
//The corresponding resource ID
|
@@ -57,9 +57,9 @@ class bcn_breadcrumb
|
|
57 |
//Set the title
|
58 |
$this->set_title($title);
|
59 |
//Assign the breadcrumb template
|
60 |
-
if($template == NULL)
|
61 |
{
|
62 |
-
if($url == NULL)
|
63 |
{
|
64 |
$template = __('<span typeof="v:Breadcrumb"><span property="v:title">%htitle%</span></span>', 'breadcrumb-navxt');
|
65 |
}
|
@@ -68,7 +68,7 @@ class bcn_breadcrumb
|
|
68 |
$template = __('<span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" title="Go to %title%." href="%link%" class="%type%">%htitle%</a></span>', 'breadcrumb-navxt');
|
69 |
}
|
70 |
}
|
71 |
-
if($url == NULL)
|
72 |
{
|
73 |
$this->template_no_anchor = wp_kses(apply_filters('bcn_breadcrumb_template_no_anchor', $template, $this->type, $this->id), $this->allowed_html);
|
74 |
}
|
@@ -109,7 +109,7 @@ class bcn_breadcrumb
|
|
109 |
{
|
110 |
$this->url = esc_url(apply_filters('bcn_breadcrumb_url', $url, $this->type, $this->id));
|
111 |
//Set linked to true if we set a non-null $url
|
112 |
-
if($url)
|
113 |
{
|
114 |
$this->linked = true;
|
115 |
}
|
21 |
class bcn_breadcrumb
|
22 |
{
|
23 |
//Our member variables
|
24 |
+
const version = '5.2.1';
|
25 |
//The main text that will be shown
|
26 |
protected $title;
|
27 |
//The breadcrumb's template, used durring assembly
|
29 |
//The breadcrumb's no anchor template, used durring assembly when there won't be an anchor
|
30 |
protected $template_no_anchor = '%title%';
|
31 |
//Boolean, is this element linked
|
32 |
+
protected $linked = false;
|
33 |
//The link the breadcrumb leads to, null if $linked == false
|
34 |
protected $url;
|
35 |
//The corresponding resource ID
|
57 |
//Set the title
|
58 |
$this->set_title($title);
|
59 |
//Assign the breadcrumb template
|
60 |
+
if($template == NULL || $url == '')
|
61 |
{
|
62 |
+
if($url == NULL || $url == '')
|
63 |
{
|
64 |
$template = __('<span typeof="v:Breadcrumb"><span property="v:title">%htitle%</span></span>', 'breadcrumb-navxt');
|
65 |
}
|
68 |
$template = __('<span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" title="Go to %title%." href="%link%" class="%type%">%htitle%</a></span>', 'breadcrumb-navxt');
|
69 |
}
|
70 |
}
|
71 |
+
if($url == NULL || $url == '')
|
72 |
{
|
73 |
$this->template_no_anchor = wp_kses(apply_filters('bcn_breadcrumb_template_no_anchor', $template, $this->type, $this->id), $this->allowed_html);
|
74 |
}
|
109 |
{
|
110 |
$this->url = esc_url(apply_filters('bcn_breadcrumb_url', $url, $this->type, $this->id));
|
111 |
//Set linked to true if we set a non-null $url
|
112 |
+
if($url && $url != '')
|
113 |
{
|
114 |
$this->linked = true;
|
115 |
}
|
class.bcn_breadcrumb_trail.php
CHANGED
@@ -21,7 +21,7 @@ require_once(dirname(__FILE__) . '/includes/block_direct_access.php');
|
|
21 |
class bcn_breadcrumb_trail
|
22 |
{
|
23 |
//Our member variables
|
24 |
-
const version = '5.2.
|
25 |
//An array of breadcrumbs
|
26 |
public $breadcrumbs = array();
|
27 |
public $trail = array();
|
@@ -170,10 +170,8 @@ class bcn_breadcrumb_trail
|
|
170 |
{
|
171 |
//Since we are paged and are linking the root breadcrumb, time to change to the regular template
|
172 |
$breadcrumb->set_template($this->opt['Hsearch_template']);
|
173 |
-
//Figure out the hyperlink for the anchor
|
174 |
-
$url = home_url('?s=' . str_replace(' ', '+', get_search_query()));
|
175 |
//Figure out the anchor for the search
|
176 |
-
$breadcrumb->set_url(
|
177 |
}
|
178 |
}
|
179 |
/**
|
@@ -274,11 +272,11 @@ class bcn_breadcrumb_trail
|
|
274 |
}
|
275 |
}
|
276 |
//If we never got a good parent for the type_archive, make it now
|
277 |
-
if($parent
|
278 |
{
|
279 |
$parent = get_post($id);
|
280 |
}
|
281 |
-
//
|
282 |
$this->type_archive($parent);
|
283 |
}
|
284 |
/**
|
@@ -424,10 +422,16 @@ class bcn_breadcrumb_trail
|
|
424 |
//Add the link
|
425 |
$breadcrumb->set_url(get_permalink());
|
426 |
}
|
427 |
-
//
|
428 |
-
$
|
429 |
-
//
|
430 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
}
|
432 |
/**
|
433 |
* A Breadcrumb Trail Filling Function
|
@@ -711,6 +715,11 @@ class bcn_breadcrumb_trail
|
|
711 |
if(is_attachment())
|
712 |
{
|
713 |
$type = get_post($post->post_parent);
|
|
|
|
|
|
|
|
|
|
|
714 |
}
|
715 |
else
|
716 |
{
|
21 |
class bcn_breadcrumb_trail
|
22 |
{
|
23 |
//Our member variables
|
24 |
+
const version = '5.2.1';
|
25 |
//An array of breadcrumbs
|
26 |
public $breadcrumbs = array();
|
27 |
public $trail = array();
|
170 |
{
|
171 |
//Since we are paged and are linking the root breadcrumb, time to change to the regular template
|
172 |
$breadcrumb->set_template($this->opt['Hsearch_template']);
|
|
|
|
|
173 |
//Figure out the anchor for the search
|
174 |
+
$breadcrumb->set_url(get_search_link());
|
175 |
}
|
176 |
}
|
177 |
/**
|
272 |
}
|
273 |
}
|
274 |
//If we never got a good parent for the type_archive, make it now
|
275 |
+
if(!($parent instanceof WP_Post))
|
276 |
{
|
277 |
$parent = get_post($id);
|
278 |
}
|
279 |
+
//Finish off with trying to find the type archive
|
280 |
$this->type_archive($parent);
|
281 |
}
|
282 |
/**
|
422 |
//Add the link
|
423 |
$breadcrumb->set_url(get_permalink());
|
424 |
}
|
425 |
+
//Done with the current item, now on to the parents
|
426 |
+
$frontpage = get_option('page_on_front');
|
427 |
+
//Make sure the id is valid, and that we won't end up spinning in a loop
|
428 |
+
if($post->post_parent >= 0 && $post->post_parent != false && $post->ID != $post->post_parent && $frontpage != $post->post_parent)
|
429 |
+
{
|
430 |
+
//Get the parent's information
|
431 |
+
$parent = get_post($post->post_parent);
|
432 |
+
//Take care of the parent's breadcrumb
|
433 |
+
$this->do_post($parent);
|
434 |
+
}
|
435 |
}
|
436 |
/**
|
437 |
* A Breadcrumb Trail Filling Function
|
715 |
if(is_attachment())
|
716 |
{
|
717 |
$type = get_post($post->post_parent);
|
718 |
+
//If the parent of the attachment is a page, exit early (works around bug where is_single() returns true for an attachment to a page)
|
719 |
+
if($type->post_type == 'page')
|
720 |
+
{
|
721 |
+
return;
|
722 |
+
}
|
723 |
}
|
724 |
else
|
725 |
{
|
class.bcn_network_admin.php
CHANGED
@@ -42,7 +42,7 @@ if(!class_exists('mtekk_adminKit'))
|
|
42 |
*/
|
43 |
class bcn_network_admin extends mtekk_adminKit
|
44 |
{
|
45 |
-
const version = '5.2.
|
46 |
protected $full_name = 'Breadcrumb NavXT Network Settings';
|
47 |
protected $short_name = 'Breadcrumb NavXT';
|
48 |
protected $access_level = 'manage_network_options';
|
42 |
*/
|
43 |
class bcn_network_admin extends mtekk_adminKit
|
44 |
{
|
45 |
+
const version = '5.2.1';
|
46 |
protected $full_name = 'Breadcrumb NavXT Network Settings';
|
47 |
protected $short_name = 'Breadcrumb NavXT';
|
48 |
protected $access_level = 'manage_network_options';
|
class.bcn_widget.php
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
require_once(dirname(__FILE__) . '/includes/block_direct_access.php');
|
20 |
class bcn_widget extends WP_Widget
|
21 |
{
|
22 |
-
const version = '5.2.
|
23 |
protected $defaults = array('title' => '', 'pretext' => '', 'type' => 'microdata', 'linked' => true, 'reverse' => false, 'front' => false);
|
24 |
//Default constructor
|
25 |
function __construct()
|
19 |
require_once(dirname(__FILE__) . '/includes/block_direct_access.php');
|
20 |
class bcn_widget extends WP_Widget
|
21 |
{
|
22 |
+
const version = '5.2.1';
|
23 |
protected $defaults = array('title' => '', 'pretext' => '', 'type' => 'microdata', 'linked' => true, 'reverse' => false, 'front' => false);
|
24 |
//Default constructor
|
25 |
function __construct()
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: mtekk, hakre
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FD5XEU783BR8U&lc=US&item_name=Breadcrumb%20NavXT%20Donation¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
Tags: breadcrumb, breadcrumbs, trail, navigation, menu, widget
|
5 |
Requires at least: 3.9
|
6 |
-
Tested up to: 4.2
|
7 |
-
Stable tag: 5.2
|
8 |
License: GPLv2 or later
|
9 |
Adds breadcrumb navigation showing the visitor's path to their current location.
|
10 |
|
@@ -34,7 +34,6 @@ Breadcrumb NavXT distributes with translations for the following languages:
|
|
34 |
* Catalan by Christian Eduardo
|
35 |
* German by Daniel Lang
|
36 |
* French (France) by Emmanuel Beziat, Erwan Lescop, and Serge Rauber
|
37 |
-
* Turkish by Hakan Er
|
38 |
* Czech by jakubmachala
|
39 |
* Norwegian (Bokmål) by Jan Rosvoldsve
|
40 |
* Danish by Joachim Jensen
|
@@ -71,6 +70,14 @@ Please visit [Breadcrumb NavXT's Documentation](http://mtekk.us/code/breadcrumb-
|
|
71 |
6. A screenshot of the Settings Import/Export/Reset form under the Help menu
|
72 |
|
73 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
= 5.2.0 =
|
75 |
* Deprecated: The Max Breadcrumb Length setting has been deprecated in favor of [using CSS styling to perform the length limiting](http://mtekk.us/archives/guides/trimming-breadcrumb-title-lengths-with-css/ "Go to the article presenting how to shorten the breadcrumb title length using CSS").
|
76 |
* Behavior change: The archive page for a post type is now generated for the top ancestor post rather than for the current page when "post parent" is used as the post's hierarchy.
|
@@ -305,11 +312,11 @@ Please visit [Breadcrumb NavXT's Documentation](http://mtekk.us/code/breadcrumb-
|
|
305 |
|
306 |
== Upgrade Notice ==
|
307 |
|
|
|
|
|
|
|
308 |
= 5.2.0 =
|
309 |
This version requires PHP5.3 or newer. Some improvements to the settings page were made. Additionally, note that the Max Breadcrumb Length setting has been deprecated in favor of [using CSS styling to perform the length limiting](http://mtekk.us/archives/guides/trimming-breadcrumb-title-lengths-with-css/ "Go to the article presenting how to shorten the breadcrumb title length using CSS").ion enhances compatibility with bbPress.
|
310 |
|
311 |
= 5.1.0 =
|
312 |
-
This version fixes a ton of bugs, plus adds a new filter and features support for RDFa Breadcrumb by default.
|
313 |
-
|
314 |
-
= 5.0.0 =
|
315 |
-
This version is for the developers, those who like to extend things gracefully. Several new hooks were introduced, while others were tweaked to be more useful. If you have WordPress setup as a multisite install/in network mode, the new Breadcrumb NavXT network settings page will take priority over the individual sub site settings pages. This is a major change from previous versions. See [Controlling Breadcrumb NavXT Settings From the Network Settings Page](http://mtekk.us/archives/guides/controlling-breadcrumb-navxt-settings-from-the-network-settings-page/"Go to the article on controlling the settings hierarchy") for more information on the new settings modes.
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FD5XEU783BR8U&lc=US&item_name=Breadcrumb%20NavXT%20Donation¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
Tags: breadcrumb, breadcrumbs, trail, navigation, menu, widget
|
5 |
Requires at least: 3.9
|
6 |
+
Tested up to: 4.2.2
|
7 |
+
Stable tag: 5.2.1
|
8 |
License: GPLv2 or later
|
9 |
Adds breadcrumb navigation showing the visitor's path to their current location.
|
10 |
|
34 |
* Catalan by Christian Eduardo
|
35 |
* German by Daniel Lang
|
36 |
* French (France) by Emmanuel Beziat, Erwan Lescop, and Serge Rauber
|
|
|
37 |
* Czech by jakubmachala
|
38 |
* Norwegian (Bokmål) by Jan Rosvoldsve
|
39 |
* Danish by Joachim Jensen
|
70 |
6. A screenshot of the Settings Import/Export/Reset form under the Help menu
|
71 |
|
72 |
== Changelog ==
|
73 |
+
= 5.2.1 =
|
74 |
+
* Bug fix: Added additional checks for empty URLs and templates within `bcn_breadcrumb` to prevent various bugs when empty URLs and/or templates are passed in.
|
75 |
+
* Bug fix: Move away from building URLs for search breadcrumbs and instead using `get_search_link()` to fix support for pretty permalinks.
|
76 |
+
* Bug fix: Fixed issue where media items (attachments) that have not been attached to a post yet would cause an incorrect breadcrumb trail to be generated.
|
77 |
+
* Bug fix: Fixed issue where attachments of the front page would cause PHP Warnings.
|
78 |
+
* Bug fix: Fixed issue where attachments of the front page would have duplicate breadcrumbs for the home page.
|
79 |
+
* Bug fix: Fixed issue where attachments of pages would have an extraneous breadcrumb relating to the page for posts.
|
80 |
+
* Bug fix: Fixed issue with the text domain/domain path in the plugin header.
|
81 |
= 5.2.0 =
|
82 |
* Deprecated: The Max Breadcrumb Length setting has been deprecated in favor of [using CSS styling to perform the length limiting](http://mtekk.us/archives/guides/trimming-breadcrumb-title-lengths-with-css/ "Go to the article presenting how to shorten the breadcrumb title length using CSS").
|
83 |
* Behavior change: The archive page for a post type is now generated for the top ancestor post rather than for the current page when "post parent" is used as the post's hierarchy.
|
312 |
|
313 |
== Upgrade Notice ==
|
314 |
|
315 |
+
= 5.2.1 =
|
316 |
+
This version requires PHP5.3 or newer. This is a bug fix release with four bug fixes relating to attachments and a few other bug fixes.
|
317 |
+
|
318 |
= 5.2.0 =
|
319 |
This version requires PHP5.3 or newer. Some improvements to the settings page were made. Additionally, note that the Max Breadcrumb Length setting has been deprecated in favor of [using CSS styling to perform the length limiting](http://mtekk.us/archives/guides/trimming-breadcrumb-title-lengths-with-css/ "Go to the article presenting how to shorten the breadcrumb title length using CSS").ion enhances compatibility with bbPress.
|
320 |
|
321 |
= 5.1.0 =
|
322 |
+
This version fixes a ton of bugs, plus adds a new filter and features support for RDFa Breadcrumb by default.
|
|
|
|
|
|