Version Description
Download this release
Release Info
Developer | mtekk |
Plugin | Breadcrumb NavXT |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2
- breadcrumb_navxt_admin.php +2 -2
- breadcrumb_navxt_class.php +85 -76
- readme.txt +2 -2
breadcrumb_navxt_admin.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
Plugin Name: Breadcrumb NavXT - Adminstration Interface
|
4 |
Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
|
5 |
Description: Adds a breadcrumb navigation showing the visitor's path to their current location. This enables the administrative interface for specifying the output of the breadcrumb. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
|
6 |
-
Version: 2.1.
|
7 |
Author: John Havlik
|
8 |
Author URI: http://mtekk.weblogs.us/
|
9 |
*/
|
10 |
-
$bcn_admin_version = "2.1.
|
11 |
$bcn_admin_req = 8;
|
12 |
//Include the breadcrumb class if needed
|
13 |
if(!class_exists('bcn_breadcrumb'))
|
3 |
Plugin Name: Breadcrumb NavXT - Adminstration Interface
|
4 |
Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
|
5 |
Description: Adds a breadcrumb navigation showing the visitor's path to their current location. This enables the administrative interface for specifying the output of the breadcrumb. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
|
6 |
+
Version: 2.1.2
|
7 |
Author: John Havlik
|
8 |
Author URI: http://mtekk.weblogs.us/
|
9 |
*/
|
10 |
+
$bcn_admin_version = "2.1.2";
|
11 |
$bcn_admin_req = 8;
|
12 |
//Include the breadcrumb class if needed
|
13 |
if(!class_exists('bcn_breadcrumb'))
|
breadcrumb_navxt_class.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Breadcrumb NavXT - Core
|
4 |
Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
|
5 |
Description: Adds a breadcrumb navigation showing the visitor's path to their current location. This plug-in provides direct access to the bcn_breadcrumb class without using the administrative interface. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
|
6 |
-
Version: 2.1.
|
7 |
Author: John Havlik
|
8 |
Author URI: http://mtekk.weblogs.us/
|
9 |
*/
|
@@ -23,7 +23,7 @@ Author URI: http://mtekk.weblogs.us/
|
|
23 |
along with this program; if not, write to the Free Software
|
24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
-
$bcn_version = "2.1.
|
27 |
//The main class
|
28 |
class bcn_breadcrumb
|
29 |
{
|
@@ -40,7 +40,7 @@ class bcn_breadcrumb
|
|
40 |
//Use it if your blog is available at http://www.site.com/myweblog/,
|
41 |
//and at http://www.site.com/ a Wordpress page is being displayed:
|
42 |
//In this case apply '/myweblog/'.
|
43 |
-
'url_blog' => ''
|
44 |
//Display HOME? If set to false, HOME is not being displayed.
|
45 |
'home_display' => 'true',
|
46 |
//URL for the home link
|
@@ -149,18 +149,22 @@ class bcn_breadcrumb
|
|
149 |
function do_home()
|
150 |
{
|
151 |
//Static front page
|
152 |
-
if(
|
153 |
{
|
154 |
-
//
|
155 |
-
if($this->opt['
|
156 |
{
|
157 |
-
//
|
158 |
-
$this->
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
|
|
|
|
|
|
164 |
}
|
165 |
}
|
166 |
//If it's paged, we'll want to link it to the first page
|
@@ -180,7 +184,7 @@ class bcn_breadcrumb
|
|
180 |
}
|
181 |
function do_title()
|
182 |
{
|
183 |
-
if($this->opt['static_frontpage'] === 'true')
|
184 |
{
|
185 |
//Single posts, archives of all types, and the author pages are descendents of "blog"
|
186 |
if(is_single() || is_archive() || is_author() || (is_home() && $this->opt['link_current_item'] === 'true'))
|
@@ -492,6 +496,7 @@ class bcn_breadcrumb
|
|
492 |
//Handled paged items
|
493 |
function do_paged()
|
494 |
{
|
|
|
495 |
//For home pages
|
496 |
if(is_home())
|
497 |
{
|
@@ -519,65 +524,65 @@ class bcn_breadcrumb
|
|
519 |
else
|
520 |
{
|
521 |
$this->do_title();
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
}
|
582 |
}
|
583 |
//Breadcrumb Creation Function
|
@@ -616,9 +621,13 @@ class bcn_breadcrumb
|
|
616 |
{
|
617 |
if($this->opt['link_current_item'] === 'true')
|
618 |
{
|
619 |
-
$this->breadcrumb['last']['item'] = '<a title="' . $this->opt['current_item_urltitle'] .
|
|
|
|
|
620 |
}
|
621 |
-
$bcn_output .= $this->opt['separator'] . $this->opt['current_item_style_prefix'] .
|
|
|
|
|
622 |
}
|
623 |
}
|
624 |
//Polyglot compatibility filter
|
@@ -639,4 +648,4 @@ class bcn_breadcrumb
|
|
639 |
}
|
640 |
}
|
641 |
}
|
642 |
-
?>
|
3 |
Plugin Name: Breadcrumb NavXT - Core
|
4 |
Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
|
5 |
Description: Adds a breadcrumb navigation showing the visitor's path to their current location. This plug-in provides direct access to the bcn_breadcrumb class without using the administrative interface. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
|
6 |
+
Version: 2.1.2
|
7 |
Author: John Havlik
|
8 |
Author URI: http://mtekk.weblogs.us/
|
9 |
*/
|
23 |
along with this program; if not, write to the Free Software
|
24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
+
$bcn_version = "2.1.2";
|
27 |
//The main class
|
28 |
class bcn_breadcrumb
|
29 |
{
|
40 |
//Use it if your blog is available at http://www.site.com/myweblog/,
|
41 |
//and at http://www.site.com/ a Wordpress page is being displayed:
|
42 |
//In this case apply '/myweblog/'.
|
43 |
+
'url_blog' => '',
|
44 |
//Display HOME? If set to false, HOME is not being displayed.
|
45 |
'home_display' => 'true',
|
46 |
//URL for the home link
|
149 |
function do_home()
|
150 |
{
|
151 |
//Static front page
|
152 |
+
if($this->opt['static_frontpage'] === 'true' || get_option('page_on_front'))
|
153 |
{
|
154 |
+
//If we're displaying the home
|
155 |
+
if($this->opt['home_display'] === 'true')
|
156 |
{
|
157 |
+
//Should we display the home link or not
|
158 |
+
if($this->opt['home_link'] === 'true')
|
159 |
+
{
|
160 |
+
//If so, let's set it up
|
161 |
+
$this->breadcrumb['title'] = '<a title="' . $this->opt['urltitle_prefix'] . $this->opt['title_home'] . $this->opt['urltitle_suffix'] . '" href="' . $this->opt['url_home'] . '">' . $this->opt['title_home'] . '</a>';
|
162 |
+
}
|
163 |
+
else
|
164 |
+
{
|
165 |
+
//Otherwise just the specified 'title_home' will do
|
166 |
+
$this->breadcrumb['title'] = $this->opt['title_home'];
|
167 |
+
}
|
168 |
}
|
169 |
}
|
170 |
//If it's paged, we'll want to link it to the first page
|
184 |
}
|
185 |
function do_title()
|
186 |
{
|
187 |
+
if($this->opt['static_frontpage'] === 'true' || get_option('page_on_front'))
|
188 |
{
|
189 |
//Single posts, archives of all types, and the author pages are descendents of "blog"
|
190 |
if(is_single() || is_archive() || is_author() || (is_home() && $this->opt['link_current_item'] === 'true'))
|
496 |
//Handled paged items
|
497 |
function do_paged()
|
498 |
{
|
499 |
+
global $paged;
|
500 |
//For home pages
|
501 |
if(is_home())
|
502 |
{
|
524 |
else
|
525 |
{
|
526 |
$this->do_title();
|
527 |
+
//For searches
|
528 |
+
if(is_search())
|
529 |
+
{
|
530 |
+
$this->do_search();
|
531 |
+
}
|
532 |
+
////////////////////////////////////
|
533 |
+
//For pages
|
534 |
+
else if(is_page())
|
535 |
+
{
|
536 |
+
$this->do_page();
|
537 |
+
}
|
538 |
+
////////////////////////////////////
|
539 |
+
//For post/page attachments
|
540 |
+
else if(is_attachment())
|
541 |
+
{
|
542 |
+
$this->do_attachment();
|
543 |
+
}
|
544 |
+
////////////////////////////////////
|
545 |
+
//For blog posts
|
546 |
+
else if(is_single())
|
547 |
+
{
|
548 |
+
$this->do_post();
|
549 |
+
}
|
550 |
+
////////////////////////////////////
|
551 |
+
//For author pages
|
552 |
+
else if(is_author())
|
553 |
+
{
|
554 |
+
$this->do_author();
|
555 |
+
}
|
556 |
+
////////////////////////////////////
|
557 |
+
//For category based archives
|
558 |
+
else if(is_archive() && is_category())
|
559 |
+
{
|
560 |
+
$this->do_archive_by_category();
|
561 |
+
}
|
562 |
+
////////////////////////////////////
|
563 |
+
//For date based archives
|
564 |
+
else if(is_archive() && is_date())
|
565 |
+
{
|
566 |
+
$this->do_archive_by_date();
|
567 |
+
}
|
568 |
+
////////////////////////////////////
|
569 |
+
//For tag based archives
|
570 |
+
else if(is_archive() && is_tag())
|
571 |
+
{
|
572 |
+
$this->do_archive_by_tag();
|
573 |
+
}
|
574 |
+
////////////////////////////////////
|
575 |
+
//For 404 pages
|
576 |
+
else if(is_404())
|
577 |
+
{
|
578 |
+
$this->breadcrumb['last']['item'] = $this->opt['title_404'];
|
579 |
+
}
|
580 |
+
////////////////////////////////////
|
581 |
+
//For paged items
|
582 |
+
if(is_paged() && $this->opt['paged_display'] === 'true')
|
583 |
+
{
|
584 |
+
$this->do_paged();
|
585 |
+
}
|
586 |
}
|
587 |
}
|
588 |
//Breadcrumb Creation Function
|
621 |
{
|
622 |
if($this->opt['link_current_item'] === 'true')
|
623 |
{
|
624 |
+
$this->breadcrumb['last']['item'] = '<a title="' . $this->opt['current_item_urltitle'] .
|
625 |
+
'" href="' . '">' .
|
626 |
+
$this->breadcrumb['last']['item'] . '</a>';
|
627 |
}
|
628 |
+
$bcn_output .= $this->opt['separator'] . $this->opt['current_item_style_prefix'] .
|
629 |
+
$this->breadcrumb['last']['prefix'] . $this->breadcrumb['last']['item'] .
|
630 |
+
$this->breadcrumb['last']['suffix'] . $this->opt['current_item_style_suffix'];
|
631 |
}
|
632 |
}
|
633 |
//Polyglot compatibility filter
|
648 |
}
|
649 |
}
|
650 |
}
|
651 |
+
?>
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: mtekk, hakre
|
3 |
Tags: breadcrumb, navigation
|
4 |
Requires at least: 2.5.0
|
5 |
-
Tested up to: 2.5
|
6 |
-
Stable tag: 2.1.
|
7 |
|
8 |
Adds breadcrumb navigation showing the visitor's path to their current location.
|
9 |
|
2 |
Contributors: mtekk, hakre
|
3 |
Tags: breadcrumb, navigation
|
4 |
Requires at least: 2.5.0
|
5 |
+
Tested up to: 2.5.1
|
6 |
+
Stable tag: 2.1.2
|
7 |
|
8 |
Adds breadcrumb navigation showing the visitor's path to their current location.
|
9 |
|