Version Description
Release date: December, 31st 2019
- Behavior change: Attachment post type settings moved to Media, additional post type options made available.
- Behavior change: Privately published parent posts are now, by default, skipped over in breadcrumb trails.
- Behavior change: On single post breadcrumb trails, the hierarchical term code path is now used in cases where only a single term from a non-hierarchical taxonomy is present for the current post.
- New feature: Allow
%link%
tag in unlinked breadcrumb templates. - New feature: Added
bcn_show_post_private
filter. - New feature: Added
bcn_show_type_term_archive
filter.
Download this release
Release Info
Developer | mtekk |
Plugin | Breadcrumb NavXT |
Version | 6.4.0 |
Comparing to | |
See all releases |
Code changes from version 6.3.0 to 6.4.0
- breadcrumb-navxt.php +3 -3
- class.bcn_admin.php +3 -10
- class.bcn_breadcrumb.php +18 -17
- class.bcn_breadcrumb_trail.php +120 -49
- class.bcn_network_admin.php +2 -2
- class.bcn_rest_controller.php +1 -1
- class.bcn_widget.php +2 -2
- includes/block_direct_access.php +1 -1
- includes/class.mtekk_adminkit.php +2 -2
- includes/class.mtekk_adminkit_message.php +1 -1
- includes/class.mtekk_adminkit_uninstaller.php +1 -1
- includes/multibyte_supplicant.php +1 -1
- readme.txt +13 -2
- uninstall.php +1 -1
breadcrumb-navxt.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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: 6.
|
7 |
Author: John Havlik
|
8 |
Author URI: http://mtekk.us/
|
9 |
License: GPL2
|
@@ -11,7 +11,7 @@ Text Domain: breadcrumb-navxt
|
|
11 |
Domain Path: /languages
|
12 |
*/
|
13 |
/*
|
14 |
-
Copyright 2007-
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License as published by
|
@@ -61,7 +61,7 @@ $breadcrumb_navxt = null;
|
|
61 |
//TODO change to extends mtekk_plugKit
|
62 |
class breadcrumb_navxt
|
63 |
{
|
64 |
-
const version = '6.
|
65 |
protected $name = 'Breadcrumb NavXT';
|
66 |
protected $identifier = 'breadcrumb-navxt';
|
67 |
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: 6.4.0
|
7 |
Author: John Havlik
|
8 |
Author URI: http://mtekk.us/
|
9 |
License: GPL2
|
11 |
Domain Path: /languages
|
12 |
*/
|
13 |
/*
|
14 |
+
Copyright 2007-2020 John Havlik (email : john.havlik@mtekk.us)
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License as published by
|
61 |
//TODO change to extends mtekk_plugKit
|
62 |
class breadcrumb_navxt
|
63 |
{
|
64 |
+
const version = '6.4.0';
|
65 |
protected $name = 'Breadcrumb NavXT';
|
66 |
protected $identifier = 'breadcrumb-navxt';
|
67 |
protected $unique_prefix = 'bcn';
|
class.bcn_admin.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2015-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
@@ -43,7 +43,7 @@ if(!class_exists('mtekk_adminKit'))
|
|
43 |
*/
|
44 |
class bcn_admin extends mtekk_adminKit
|
45 |
{
|
46 |
-
const version = '6.
|
47 |
protected $full_name = 'Breadcrumb NavXT Settings';
|
48 |
protected $short_name = 'Breadcrumb NavXT';
|
49 |
protected $access_level = 'manage_options';
|
@@ -586,13 +586,6 @@ class bcn_admin extends mtekk_adminKit
|
|
586 |
$this->input_hidden('Spost_page_hierarchy_type');
|
587 |
?>
|
588 |
</table>
|
589 |
-
<h2><?php _e('Attachments', 'breadcrumb-navxt'); ?></h2>
|
590 |
-
<table class="form-table">
|
591 |
-
<?php
|
592 |
-
$this->textbox(__('Attachment Template', 'breadcrumb-navxt'), 'Hpost_attachment_template', '6', false, __('The template for attachment breadcrumbs.', 'breadcrumb-navxt'));
|
593 |
-
$this->textbox(__('Attachment Template (Unlinked)', 'breadcrumb-navxt'), 'Hpost_attachment_template_no_anchor', '4', false, __('The template for attachment breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
|
594 |
-
?>
|
595 |
-
</table>
|
596 |
<?php
|
597 |
//Loop through all of the post types in the array
|
598 |
foreach($wp_post_types as $post_type)
|
@@ -603,7 +596,7 @@ class bcn_admin extends mtekk_adminKit
|
|
603 |
continue;
|
604 |
}
|
605 |
//We only want custom post types
|
606 |
-
if(!$post_type->_builtin)
|
607 |
{
|
608 |
$singular_name_lc = mb_strtolower($post_type->labels->singular_name, 'UTF-8');
|
609 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
43 |
*/
|
44 |
class bcn_admin extends mtekk_adminKit
|
45 |
{
|
46 |
+
const version = '6.4.0';
|
47 |
protected $full_name = 'Breadcrumb NavXT Settings';
|
48 |
protected $short_name = 'Breadcrumb NavXT';
|
49 |
protected $access_level = 'manage_options';
|
586 |
$this->input_hidden('Spost_page_hierarchy_type');
|
587 |
?>
|
588 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
<?php
|
590 |
//Loop through all of the post types in the array
|
591 |
foreach($wp_post_types as $post_type)
|
596 |
continue;
|
597 |
}
|
598 |
//We only want custom post types
|
599 |
+
if($post_type->name === 'attachment' || !$post_type->_builtin)
|
600 |
{
|
601 |
$singular_name_lc = mb_strtolower($post_type->labels->singular_name, 'UTF-8');
|
602 |
?>
|
class.bcn_breadcrumb.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2007-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
@@ -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 = '6.
|
25 |
//The main text that will be shown
|
26 |
protected $title;
|
27 |
//The breadcrumb's template, used durring assembly
|
@@ -46,8 +46,9 @@ class bcn_breadcrumb
|
|
46 |
* @param string $template (optional) The html template for the breadcrumb
|
47 |
* @param string $type (optional) The breadcrumb type
|
48 |
* @param string $url (optional) The url the breadcrumb links to
|
|
|
49 |
*/
|
50 |
-
public function __construct($title = '', $template = '', array $type = array(), $url = '', $id = null)
|
51 |
{
|
52 |
//Filter allowed_html array to allow others to add acceptable tags
|
53 |
$this->allowed_html = apply_filters('bcn_allowed_html', wp_kses_allowed_html('post'));
|
@@ -67,19 +68,19 @@ class bcn_breadcrumb
|
|
67 |
//If something was passed in template wise, update the appropriate internal template
|
68 |
else
|
69 |
{
|
70 |
-
|
71 |
-
if($url == null)
|
72 |
{
|
73 |
-
$this->
|
74 |
-
$this->set_template(bcn_breadcrumb::get_default_template());
|
75 |
}
|
76 |
else
|
77 |
{
|
78 |
-
$this->
|
|
|
79 |
}
|
80 |
}
|
81 |
//Always null if unlinked
|
82 |
$this->set_url($url);
|
|
|
83 |
}
|
84 |
/**
|
85 |
* Function to return the translated default template
|
@@ -120,15 +121,15 @@ class bcn_breadcrumb
|
|
120 |
{
|
121 |
$url = trim($url);
|
122 |
$this->url = apply_filters('bcn_breadcrumb_url', $url, $this->type, $this->id);
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
}
|
133 |
/**
|
134 |
* Function to set the internal breadcrumb template
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2007-2020 John Havlik (email : john.havlik@mtekk.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
21 |
class bcn_breadcrumb
|
22 |
{
|
23 |
//Our member variables
|
24 |
+
const version = '6.4.0';
|
25 |
//The main text that will be shown
|
26 |
protected $title;
|
27 |
//The breadcrumb's template, used durring assembly
|
46 |
* @param string $template (optional) The html template for the breadcrumb
|
47 |
* @param string $type (optional) The breadcrumb type
|
48 |
* @param string $url (optional) The url the breadcrumb links to
|
49 |
+
* @param bool $linked (optional) Whether or not the breadcrumb uses the linked or unlinked template
|
50 |
*/
|
51 |
+
public function __construct($title = '', $template = '', array $type = array(), $url = '', $id = null, $linked = false)
|
52 |
{
|
53 |
//Filter allowed_html array to allow others to add acceptable tags
|
54 |
$this->allowed_html = apply_filters('bcn_allowed_html', wp_kses_allowed_html('post'));
|
68 |
//If something was passed in template wise, update the appropriate internal template
|
69 |
else
|
70 |
{
|
71 |
+
if($linked)
|
|
|
72 |
{
|
73 |
+
$this->set_template($template);
|
|
|
74 |
}
|
75 |
else
|
76 |
{
|
77 |
+
$this->template_no_anchor = wp_kses(apply_filters('bcn_breadcrumb_template_no_anchor', $template, $this->type, $this->id), $this->allowed_html);
|
78 |
+
$this->set_template(bcn_breadcrumb::get_default_template());
|
79 |
}
|
80 |
}
|
81 |
//Always null if unlinked
|
82 |
$this->set_url($url);
|
83 |
+
$this->set_linked($linked);
|
84 |
}
|
85 |
/**
|
86 |
* Function to return the translated default template
|
121 |
{
|
122 |
$url = trim($url);
|
123 |
$this->url = apply_filters('bcn_breadcrumb_url', $url, $this->type, $this->id);
|
124 |
+
}
|
125 |
+
/**
|
126 |
+
* Function to se tthe internal breadcrumb linked status
|
127 |
+
*
|
128 |
+
* @param bool $linked whether or not the breadcrumb uses the linked or unlinked template
|
129 |
+
*/
|
130 |
+
public function set_linked($linked)
|
131 |
+
{
|
132 |
+
$this->linked = $linked;
|
133 |
}
|
134 |
/**
|
135 |
* Function to set the internal breadcrumb template
|
class.bcn_breadcrumb_trail.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2015-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
@@ -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 = '6.
|
25 |
//An array of breadcrumbs
|
26 |
public $breadcrumbs = array();
|
27 |
public $trail = array();
|
@@ -95,9 +95,12 @@ class bcn_breadcrumb_trail
|
|
95 |
//What hierarchy should be shown leading to the post, tag or category
|
96 |
'Spost_post_hierarchy_type' => 'category',
|
97 |
//Attachment settings
|
|
|
98 |
'bpost_attachment_hierarchy_display' => true,
|
99 |
//Should the post parent be followed first for this type, then fallback to the hierarchy type
|
100 |
'bpost_attachment_hierarchy_parent_first' => true,
|
|
|
|
|
101 |
//What hierarchy should be shown leading to the attachment
|
102 |
'Spost_attachment_hierarchy_type' => 'BCN_POST_PARENT',
|
103 |
//Give an invlaid page ID for the attachement root
|
@@ -176,14 +179,17 @@ class bcn_breadcrumb_trail
|
|
176 |
protected function do_search($search_query, $is_paged = false)
|
177 |
{
|
178 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
179 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
180 |
//If we're paged, or allowing the current item to be linked, let's link to the first page
|
181 |
if($this->opt['bcurrent_item_linked'] || ($is_paged && $this->opt['bpaged_display']))
|
182 |
{
|
183 |
//Since we are paged and are linking the root breadcrumb, time to change to the regular template
|
184 |
$breadcrumb->set_template($this->opt['Hsearch_template']);
|
185 |
-
|
186 |
-
$breadcrumb->set_url(get_search_link($search_query));
|
187 |
}
|
188 |
}
|
189 |
/**
|
@@ -202,13 +208,18 @@ class bcn_breadcrumb_trail
|
|
202 |
if(in_array($this->opt['Sauthor_name'], $valid_author_name))
|
203 |
{
|
204 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
205 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
|
|
206 |
//If we're paged, or allowing the current item to be linked, let's link to the first page
|
207 |
if($this->opt['bcurrent_item_linked'] || ($is_paged && $this->opt['bpaged_display']))
|
208 |
{
|
209 |
//Set the template to our one containing an anchor
|
210 |
$breadcrumb->set_template($this->opt['Hauthor_template']);
|
211 |
-
$breadcrumb->
|
212 |
}
|
213 |
}
|
214 |
}
|
@@ -399,7 +410,12 @@ class bcn_breadcrumb_trail
|
|
399 |
//Only process if we have terms
|
400 |
if(is_array($bcn_terms))
|
401 |
{
|
402 |
-
|
|
|
|
|
|
|
|
|
|
|
403 |
$is_first = true;
|
404 |
//Loop through all of the term results
|
405 |
foreach($bcn_terms as $term)
|
@@ -437,7 +453,12 @@ class bcn_breadcrumb_trail
|
|
437 |
if($term instanceof WP_Term)
|
438 |
{
|
439 |
//Place the breadcrumb in the trail, uses the constructor to set the title, template, and type, get a pointer to it in return
|
440 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
|
|
441 |
//Make sure the id is valid, and that we won't end up spinning in a loop
|
442 |
if($term->parent && $term->parent != $id)
|
443 |
{
|
@@ -466,8 +487,18 @@ class bcn_breadcrumb_trail
|
|
466 |
{
|
467 |
//Use WordPress API, though a bit heavier than the old method, this will ensure compatibility with other plug-ins
|
468 |
$parent = get_post($id);
|
469 |
-
//
|
470 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
//Make sure the id is valid, and that we won't end up spinning in a loop
|
472 |
if($parent->post_parent > 0 && $id != $parent->post_parent && $frontpage != $parent->post_parent)
|
473 |
{
|
@@ -494,19 +525,28 @@ class bcn_breadcrumb_trail
|
|
494 |
_doing_it_wrong(__CLASS__ . '::' . __FUNCTION__, __('$post global is not of type WP_Post', 'breadcrumb-navxt'), '5.1.1');
|
495 |
return;
|
496 |
}
|
497 |
-
//
|
498 |
-
$
|
499 |
-
if($is_current_item)
|
500 |
-
{
|
501 |
-
$breadcrumb->add_type('current-item');
|
502 |
-
}
|
503 |
-
//Under a couple of circumstances we will want to link this breadcrumb
|
504 |
-
if($force_link || ($is_current_item && $this->opt['bcurrent_item_linked']) || ($is_paged && $this->opt['bpaged_display']))
|
505 |
{
|
506 |
-
//
|
507 |
-
$breadcrumb
|
508 |
-
|
509 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
}
|
511 |
//Done with the current item, now on to the parents
|
512 |
$frontpage = get_option('page_on_front');
|
@@ -536,13 +576,18 @@ class bcn_breadcrumb_trail
|
|
536 |
protected function do_archive_by_term($term, $is_paged = false)
|
537 |
{
|
538 |
//Place the breadcrumb in the trail, uses the constructor to set the title, template, and type, get a pointer to it in return
|
539 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
|
|
540 |
//If we're paged, let's link to the first page
|
541 |
if($this->opt['bcurrent_item_linked'] || ($is_paged && $this->opt['bpaged_display']))
|
542 |
{
|
543 |
$breadcrumb->set_template($this->opt['Htax_' . $term->taxonomy . '_template']);
|
544 |
//Figure out the anchor for current category
|
545 |
-
$breadcrumb->
|
546 |
}
|
547 |
//Get parents of current term
|
548 |
if($term->parent)
|
@@ -563,7 +608,11 @@ class bcn_breadcrumb_trail
|
|
563 |
protected function do_day($post, $type, $is_paged = false, $is_current_item = true)
|
564 |
{
|
565 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
566 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
567 |
//If this is a day archive, add current-item type
|
568 |
if($is_current_item)
|
569 |
{
|
@@ -574,9 +623,8 @@ class bcn_breadcrumb_trail
|
|
574 |
{
|
575 |
//We're linking, so set the linked template
|
576 |
$breadcrumb->set_template($this->opt['Hdate_template']);
|
577 |
-
$url = get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d'));
|
578 |
//Deal with the anchor
|
579 |
-
$breadcrumb->
|
580 |
}
|
581 |
}
|
582 |
/**
|
@@ -592,7 +640,11 @@ class bcn_breadcrumb_trail
|
|
592 |
protected function do_month($post, $type, $is_paged = false, $is_current_item = true)
|
593 |
{
|
594 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
595 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
596 |
//If this is a month archive, add current-item type
|
597 |
if($is_current_item)
|
598 |
{
|
@@ -603,9 +655,8 @@ class bcn_breadcrumb_trail
|
|
603 |
{
|
604 |
//We're linking, so set the linked template
|
605 |
$breadcrumb->set_template($this->opt['Hdate_template']);
|
606 |
-
$url = get_month_link(get_the_time('Y'), get_the_time('m'));
|
607 |
//Deal with the anchor
|
608 |
-
$breadcrumb->
|
609 |
}
|
610 |
}
|
611 |
/**
|
@@ -621,7 +672,11 @@ class bcn_breadcrumb_trail
|
|
621 |
protected function do_year($post, $type, $is_paged = false, $is_current_item = true)
|
622 |
{
|
623 |
//Place the year breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
624 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
625 |
//If this is a year archive, add current-item type
|
626 |
if($is_current_item)
|
627 |
{
|
@@ -632,9 +687,7 @@ class bcn_breadcrumb_trail
|
|
632 |
{
|
633 |
//We're linking, so set the linked template
|
634 |
$breadcrumb->set_template($this->opt['Hdate_template']);
|
635 |
-
$
|
636 |
-
//Deal with the anchor
|
637 |
-
$breadcrumb->set_url($this->maybe_add_post_type_arg($url, $type));
|
638 |
}
|
639 |
}
|
640 |
/**
|
@@ -651,13 +704,16 @@ class bcn_breadcrumb_trail
|
|
651 |
$post_type_obj = get_post_type_object($type_str);
|
652 |
$title = apply_filters('post_type_archive_title', $post_type_obj->labels->name, $type_str);
|
653 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
654 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
655 |
if($this->opt['bcurrent_item_linked'] || ($is_paged && $this->opt['bpaged_display']))
|
656 |
{
|
657 |
|
658 |
$breadcrumb->set_template($this->opt['Hpost_' . $type_str . '_template']);
|
659 |
-
|
660 |
-
$breadcrumb->set_url(get_post_type_archive_link($type_str));
|
661 |
}
|
662 |
}
|
663 |
/**
|
@@ -680,7 +736,7 @@ class bcn_breadcrumb_trail
|
|
680 |
//Get the site name
|
681 |
$site_name = get_option('blogname');
|
682 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
683 |
-
$breadcrumb = $this->add(new bcn_breadcrumb($site_name, $this->opt['Hhome_template_no_anchor'], array('home')));
|
684 |
if($is_current_item)
|
685 |
{
|
686 |
$breadcrumb->add_type('current-item');
|
@@ -689,8 +745,7 @@ class bcn_breadcrumb_trail
|
|
689 |
if($force_link || ($is_current_item && $this->opt['bcurrent_item_linked']) || ($is_paged && $this->opt['bpaged_display']))
|
690 |
{
|
691 |
$breadcrumb->set_template($this->opt['Hhome_template']);
|
692 |
-
|
693 |
-
$breadcrumb->set_url(get_home_url());
|
694 |
}
|
695 |
//If we have a multi site and are not on the main site we may need to add a breadcrumb for the main site
|
696 |
if($this->opt['bmainsite_display'] && !is_main_site())
|
@@ -698,7 +753,7 @@ class bcn_breadcrumb_trail
|
|
698 |
//Get the site name
|
699 |
$site_name = get_site_option('site_name');
|
700 |
//Place the main site breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
701 |
-
$breadcrumb = $this->add(new bcn_breadcrumb($site_name, $this->opt['Hmainsite_template'], array('main-home'), get_home_url($current_site->blog_id)));
|
702 |
}
|
703 |
}
|
704 |
/**
|
@@ -829,7 +884,7 @@ class bcn_breadcrumb_trail
|
|
829 |
* @param WP_Post|WP_Taxonomy $type The post or taxonomy to generate the archive breadcrumb for
|
830 |
* @param string $type_str The type string for the archive
|
831 |
*
|
832 |
-
* TODO:
|
833 |
*/
|
834 |
protected function type_archive($type, $type_str = false)
|
835 |
{
|
@@ -842,19 +897,31 @@ class bcn_breadcrumb_trail
|
|
842 |
if($type_str && !$this->is_builtin($type_str) && $this->opt['bpost_' . $type_str . '_archive_display'] && $this->has_archive($type_str))
|
843 |
{
|
844 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
845 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
|
|
|
|
846 |
}
|
847 |
//Otherwise, if this is a custom taxonomy with an archive, add it
|
848 |
else if(isset($type->taxonomy) && isset($wp_taxonomies[$type->taxonomy]->object_type[0])
|
849 |
&& !$this->is_builtin($this->get_type_string_query_var($wp_taxonomies[$type->taxonomy]->object_type[0]))
|
850 |
&& $this->opt['bpost_' . $this->get_type_string_query_var($wp_taxonomies[$type->taxonomy]->object_type[0]) . '_archive_display']
|
851 |
&& $this->has_archive($this->get_type_string_query_var($wp_taxonomies[$type->taxonomy]->object_type[0]))
|
852 |
-
|
853 |
{
|
854 |
//We end up using the post type in several places, give it a variable
|
855 |
$post_type = apply_filters('bcn_type_archive_post_type', $this->get_type_string_query_var($wp_taxonomies[$type->taxonomy]->object_type[0]));
|
856 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
857 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
|
|
|
|
858 |
}
|
859 |
}
|
860 |
/**
|
@@ -881,7 +948,12 @@ class bcn_breadcrumb_trail
|
|
881 |
if($bcn_post instanceof WP_Post && $root_id > 0 && $root_id != $frontpage_id)
|
882 |
{
|
883 |
//Place the breadcrumb in the trail, uses the constructor to set the title, template, and type, we get a pointer to it in return
|
884 |
-
$breadcrumb = $this->add(new bcn_breadcrumb(
|
|
|
|
|
|
|
|
|
|
|
885 |
//If we are at home, or any root page archive then we need to add the current item type
|
886 |
if($is_current_item)
|
887 |
{
|
@@ -891,8 +963,7 @@ class bcn_breadcrumb_trail
|
|
891 |
if(!$is_current_item || ($is_current_item && $this->opt['bcurrent_item_linked']) || ($is_paged && $this->opt['bpaged_display']))
|
892 |
{
|
893 |
$breadcrumb->set_template($this->opt['Hpost_' . $type_str . '_template']);
|
894 |
-
|
895 |
-
$breadcrumb->set_url(get_permalink($root_id));
|
896 |
}
|
897 |
//Done with the "root", now on to the parents
|
898 |
//If there is a parent post let's find it
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
21 |
class bcn_breadcrumb_trail
|
22 |
{
|
23 |
//Our member variables
|
24 |
+
const version = '6.4.0';
|
25 |
//An array of breadcrumbs
|
26 |
public $breadcrumbs = array();
|
27 |
public $trail = array();
|
95 |
//What hierarchy should be shown leading to the post, tag or category
|
96 |
'Spost_post_hierarchy_type' => 'category',
|
97 |
//Attachment settings
|
98 |
+
'bpost_attachment_archive_display' => false,
|
99 |
'bpost_attachment_hierarchy_display' => true,
|
100 |
//Should the post parent be followed first for this type, then fallback to the hierarchy type
|
101 |
'bpost_attachment_hierarchy_parent_first' => true,
|
102 |
+
//Should the trail reflect the referer taxonomy or not
|
103 |
+
'bpost_attachment_taxonomy_referer' => false,
|
104 |
//What hierarchy should be shown leading to the attachment
|
105 |
'Spost_attachment_hierarchy_type' => 'BCN_POST_PARENT',
|
106 |
//Give an invlaid page ID for the attachement root
|
179 |
protected function do_search($search_query, $is_paged = false)
|
180 |
{
|
181 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
182 |
+
$breadcrumb = $this->add( new bcn_breadcrumb(
|
183 |
+
$search_query,
|
184 |
+
$this->opt['Hsearch_template_no_anchor'],
|
185 |
+
array('search', 'current-item'),
|
186 |
+
get_search_link($search_query)));
|
187 |
//If we're paged, or allowing the current item to be linked, let's link to the first page
|
188 |
if($this->opt['bcurrent_item_linked'] || ($is_paged && $this->opt['bpaged_display']))
|
189 |
{
|
190 |
//Since we are paged and are linking the root breadcrumb, time to change to the regular template
|
191 |
$breadcrumb->set_template($this->opt['Hsearch_template']);
|
192 |
+
$breadcrumb->set_linked(true);
|
|
|
193 |
}
|
194 |
}
|
195 |
/**
|
208 |
if(in_array($this->opt['Sauthor_name'], $valid_author_name))
|
209 |
{
|
210 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
211 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
212 |
+
get_the_author_meta($this->opt['Sauthor_name'], $author_data->ID),
|
213 |
+
$this->opt['Hauthor_template_no_anchor'],
|
214 |
+
array('author', 'current-item'),
|
215 |
+
get_author_posts_url($author_data->ID),
|
216 |
+
$author_data->ID));
|
217 |
//If we're paged, or allowing the current item to be linked, let's link to the first page
|
218 |
if($this->opt['bcurrent_item_linked'] || ($is_paged && $this->opt['bpaged_display']))
|
219 |
{
|
220 |
//Set the template to our one containing an anchor
|
221 |
$breadcrumb->set_template($this->opt['Hauthor_template']);
|
222 |
+
$breadcrumb->set_linked(true);
|
223 |
}
|
224 |
}
|
225 |
}
|
410 |
//Only process if we have terms
|
411 |
if(is_array($bcn_terms))
|
412 |
{
|
413 |
+
//For single terms, treat as if they are hierarchical
|
414 |
+
if(count($bcn_terms) === 1 && $bcn_terms[0] instanceof WP_Term)
|
415 |
+
{
|
416 |
+
return $this->term_parents($bcn_terms[0]->term_id, $taxonomy);
|
417 |
+
}
|
418 |
+
$title = '';
|
419 |
$is_first = true;
|
420 |
//Loop through all of the term results
|
421 |
foreach($bcn_terms as $term)
|
453 |
if($term instanceof WP_Term)
|
454 |
{
|
455 |
//Place the breadcrumb in the trail, uses the constructor to set the title, template, and type, get a pointer to it in return
|
456 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
457 |
+
$term->name, $this->opt['Htax_' . $taxonomy . '_template'],
|
458 |
+
array('taxonomy', $taxonomy),
|
459 |
+
$this->maybe_add_post_type_arg(get_term_link($term), null, $taxonomy),
|
460 |
+
$id,
|
461 |
+
true));
|
462 |
//Make sure the id is valid, and that we won't end up spinning in a loop
|
463 |
if($term->parent && $term->parent != $id)
|
464 |
{
|
487 |
{
|
488 |
//Use WordPress API, though a bit heavier than the old method, this will ensure compatibility with other plug-ins
|
489 |
$parent = get_post($id);
|
490 |
+
//Only add the breadcrumb if it is non-private or we allow private posts in the breadcrumb trail
|
491 |
+
if(apply_filters('bcn_show_post_private', get_post_status($parent) !== 'private', $parent->ID))
|
492 |
+
{
|
493 |
+
//Place the breadcrumb in the trail, uses the constructor to set the title, template, and type, get a pointer to it in return
|
494 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
495 |
+
get_the_title($id),
|
496 |
+
$this->opt['Hpost_' . $parent->post_type . '_template'],
|
497 |
+
array('post', 'post-' . $parent->post_type),
|
498 |
+
get_permalink($id),
|
499 |
+
$id,
|
500 |
+
true));
|
501 |
+
}
|
502 |
//Make sure the id is valid, and that we won't end up spinning in a loop
|
503 |
if($parent->post_parent > 0 && $id != $parent->post_parent && $frontpage != $parent->post_parent)
|
504 |
{
|
525 |
_doing_it_wrong(__CLASS__ . '::' . __FUNCTION__, __('$post global is not of type WP_Post', 'breadcrumb-navxt'), '5.1.1');
|
526 |
return;
|
527 |
}
|
528 |
+
//If this is the current item or if we're allowing private posts in the trail add a breadcrumb
|
529 |
+
if($is_current_item || apply_filters('bcn_show_post_private', get_post_status($post) !== 'private', $post->ID))
|
|
|
|
|
|
|
|
|
|
|
|
|
530 |
{
|
531 |
+
//Place the breadcrumb in the trail, uses the bcn_breadcrumb constructor to set the title, template, and type
|
532 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
533 |
+
get_the_title($post),
|
534 |
+
$this->opt['Hpost_' . $post->post_type . '_template_no_anchor'],
|
535 |
+
array('post', 'post-' . $post->post_type),
|
536 |
+
get_permalink($post),
|
537 |
+
$post->ID));
|
538 |
+
if($is_current_item)
|
539 |
+
{
|
540 |
+
$breadcrumb->add_type('current-item');
|
541 |
+
}
|
542 |
+
//Under a couple of circumstances we will want to link this breadcrumb
|
543 |
+
if($force_link || ($is_current_item && $this->opt['bcurrent_item_linked']) || ($is_paged && $this->opt['bpaged_display']))
|
544 |
+
{
|
545 |
+
//Change the template over to the normal, linked one
|
546 |
+
$breadcrumb->set_template($this->opt['Hpost_' . $post->post_type . '_template']);
|
547 |
+
//Add the link
|
548 |
+
$breadcrumb->set_linked(true);
|
549 |
+
}
|
550 |
}
|
551 |
//Done with the current item, now on to the parents
|
552 |
$frontpage = get_option('page_on_front');
|
576 |
protected function do_archive_by_term($term, $is_paged = false)
|
577 |
{
|
578 |
//Place the breadcrumb in the trail, uses the constructor to set the title, template, and type, get a pointer to it in return
|
579 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
580 |
+
$term->name,
|
581 |
+
$this->opt['Htax_' . $term->taxonomy . '_template_no_anchor'],
|
582 |
+
array('archive', 'taxonomy', $term->taxonomy, 'current-item'),
|
583 |
+
$this->maybe_add_post_type_arg(get_term_link($term), null, $term->taxonomy),
|
584 |
+
$term->term_id));
|
585 |
//If we're paged, let's link to the first page
|
586 |
if($this->opt['bcurrent_item_linked'] || ($is_paged && $this->opt['bpaged_display']))
|
587 |
{
|
588 |
$breadcrumb->set_template($this->opt['Htax_' . $term->taxonomy . '_template']);
|
589 |
//Figure out the anchor for current category
|
590 |
+
$breadcrumb->set_linked(true);
|
591 |
}
|
592 |
//Get parents of current term
|
593 |
if($term->parent)
|
608 |
protected function do_day($post, $type, $is_paged = false, $is_current_item = true)
|
609 |
{
|
610 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
611 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
612 |
+
get_the_time(_x('d', 'day archive breadcrumb date format', 'breadcrumb-navxt'), $post),
|
613 |
+
$this->opt['Hdate_template_no_anchor'],
|
614 |
+
array('archive', 'date-day'),
|
615 |
+
$this->maybe_add_post_type_arg(get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')), $type)));
|
616 |
//If this is a day archive, add current-item type
|
617 |
if($is_current_item)
|
618 |
{
|
623 |
{
|
624 |
//We're linking, so set the linked template
|
625 |
$breadcrumb->set_template($this->opt['Hdate_template']);
|
|
|
626 |
//Deal with the anchor
|
627 |
+
$breadcrumb->set_linked(true);
|
628 |
}
|
629 |
}
|
630 |
/**
|
640 |
protected function do_month($post, $type, $is_paged = false, $is_current_item = true)
|
641 |
{
|
642 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
643 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
644 |
+
get_the_time(_x('F', 'month archive breadcrumb date format', 'breadcrumb-navxt'), $post),
|
645 |
+
$this->opt['Hdate_template_no_anchor'],
|
646 |
+
array('archive', 'date-month'),
|
647 |
+
$this->maybe_add_post_type_arg(get_month_link(get_the_time('Y'), get_the_time('m')), $type)));
|
648 |
//If this is a month archive, add current-item type
|
649 |
if($is_current_item)
|
650 |
{
|
655 |
{
|
656 |
//We're linking, so set the linked template
|
657 |
$breadcrumb->set_template($this->opt['Hdate_template']);
|
|
|
658 |
//Deal with the anchor
|
659 |
+
$breadcrumb->set_linked(true);
|
660 |
}
|
661 |
}
|
662 |
/**
|
672 |
protected function do_year($post, $type, $is_paged = false, $is_current_item = true)
|
673 |
{
|
674 |
//Place the year breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
675 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
676 |
+
get_the_time(_x('Y', 'year archive breadcrumb date format', 'breadcrumb-navxt'), $post),
|
677 |
+
$this->opt['Hdate_template_no_anchor'],
|
678 |
+
array('archive', 'date-year'),
|
679 |
+
$this->maybe_add_post_type_arg(get_year_link(get_the_time('Y')), $type)));
|
680 |
//If this is a year archive, add current-item type
|
681 |
if($is_current_item)
|
682 |
{
|
687 |
{
|
688 |
//We're linking, so set the linked template
|
689 |
$breadcrumb->set_template($this->opt['Hdate_template']);
|
690 |
+
$breadcrumb->set_linked(true);
|
|
|
|
|
691 |
}
|
692 |
}
|
693 |
/**
|
704 |
$post_type_obj = get_post_type_object($type_str);
|
705 |
$title = apply_filters('post_type_archive_title', $post_type_obj->labels->name, $type_str);
|
706 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
707 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
708 |
+
$title,
|
709 |
+
$this->opt['Hpost_' . $type_str . '_template_no_anchor'],
|
710 |
+
array('archive', 'post-' . $type_str . '-archive', 'current-item'),
|
711 |
+
get_post_type_archive_link($type_str)));
|
712 |
if($this->opt['bcurrent_item_linked'] || ($is_paged && $this->opt['bpaged_display']))
|
713 |
{
|
714 |
|
715 |
$breadcrumb->set_template($this->opt['Hpost_' . $type_str . '_template']);
|
716 |
+
$breadcrumb->set_linked(true);
|
|
|
717 |
}
|
718 |
}
|
719 |
/**
|
736 |
//Get the site name
|
737 |
$site_name = get_option('blogname');
|
738 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
739 |
+
$breadcrumb = $this->add(new bcn_breadcrumb($site_name, $this->opt['Hhome_template_no_anchor'], array('home'), get_home_url()));
|
740 |
if($is_current_item)
|
741 |
{
|
742 |
$breadcrumb->add_type('current-item');
|
745 |
if($force_link || ($is_current_item && $this->opt['bcurrent_item_linked']) || ($is_paged && $this->opt['bpaged_display']))
|
746 |
{
|
747 |
$breadcrumb->set_template($this->opt['Hhome_template']);
|
748 |
+
$breadcrumb->set_linked(true);
|
|
|
749 |
}
|
750 |
//If we have a multi site and are not on the main site we may need to add a breadcrumb for the main site
|
751 |
if($this->opt['bmainsite_display'] && !is_main_site())
|
753 |
//Get the site name
|
754 |
$site_name = get_site_option('site_name');
|
755 |
//Place the main site breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
756 |
+
$breadcrumb = $this->add(new bcn_breadcrumb($site_name, $this->opt['Hmainsite_template'], array('main-home'), get_home_url($current_site->blog_id), null, true));
|
757 |
}
|
758 |
}
|
759 |
/**
|
884 |
* @param WP_Post|WP_Taxonomy $type The post or taxonomy to generate the archive breadcrumb for
|
885 |
* @param string $type_str The type string for the archive
|
886 |
*
|
887 |
+
* TODO: Split and redo calls to it, see #224
|
888 |
*/
|
889 |
protected function type_archive($type, $type_str = false)
|
890 |
{
|
897 |
if($type_str && !$this->is_builtin($type_str) && $this->opt['bpost_' . $type_str . '_archive_display'] && $this->has_archive($type_str))
|
898 |
{
|
899 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
900 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
901 |
+
$this->post_type_archive_title(get_post_type_object($type_str)),
|
902 |
+
$this->opt['Hpost_' . $type_str . '_template'],
|
903 |
+
array('post', 'post-' . $type_str . '-archive'),
|
904 |
+
get_post_type_archive_link($type_str),
|
905 |
+
null,
|
906 |
+
true));
|
907 |
}
|
908 |
//Otherwise, if this is a custom taxonomy with an archive, add it
|
909 |
else if(isset($type->taxonomy) && isset($wp_taxonomies[$type->taxonomy]->object_type[0])
|
910 |
&& !$this->is_builtin($this->get_type_string_query_var($wp_taxonomies[$type->taxonomy]->object_type[0]))
|
911 |
&& $this->opt['bpost_' . $this->get_type_string_query_var($wp_taxonomies[$type->taxonomy]->object_type[0]) . '_archive_display']
|
912 |
&& $this->has_archive($this->get_type_string_query_var($wp_taxonomies[$type->taxonomy]->object_type[0]))
|
913 |
+
&& !$this->is_type_query_var_array() && apply_filters('bcn_show_type_term_archive', true, $type->taxonomy))
|
914 |
{
|
915 |
//We end up using the post type in several places, give it a variable
|
916 |
$post_type = apply_filters('bcn_type_archive_post_type', $this->get_type_string_query_var($wp_taxonomies[$type->taxonomy]->object_type[0]));
|
917 |
//Place the breadcrumb in the trail, uses the constructor to set the title, prefix, and suffix, get a pointer to it in return
|
918 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
919 |
+
$this->post_type_archive_title(get_post_type_object($post_type)),
|
920 |
+
$this->opt['Hpost_' . $post_type . '_template'],
|
921 |
+
array('post', 'post-' . $post_type . '-archive'),
|
922 |
+
get_post_type_archive_link($post_type),
|
923 |
+
null,
|
924 |
+
true));
|
925 |
}
|
926 |
}
|
927 |
/**
|
948 |
if($bcn_post instanceof WP_Post && $root_id > 0 && $root_id != $frontpage_id)
|
949 |
{
|
950 |
//Place the breadcrumb in the trail, uses the constructor to set the title, template, and type, we get a pointer to it in return
|
951 |
+
$breadcrumb = $this->add(new bcn_breadcrumb(
|
952 |
+
get_the_title($root_id),
|
953 |
+
$this->opt['Hpost_' . $type_str . '_template_no_anchor'],
|
954 |
+
array($type_str . '-root', 'post', 'post-' . $type_str),
|
955 |
+
get_permalink($root_id),
|
956 |
+
$root_id));
|
957 |
//If we are at home, or any root page archive then we need to add the current item type
|
958 |
if($is_current_item)
|
959 |
{
|
963 |
if(!$is_current_item || ($is_current_item && $this->opt['bcurrent_item_linked']) || ($is_paged && $this->opt['bpaged_display']))
|
964 |
{
|
965 |
$breadcrumb->set_template($this->opt['Hpost_' . $type_str . '_template']);
|
966 |
+
$breadcrumb->set_linked(true);
|
|
|
967 |
}
|
968 |
//Done with the "root", now on to the parents
|
969 |
//If there is a parent post let's find it
|
class.bcn_network_admin.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2015-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
@@ -28,7 +28,7 @@ if(!class_exists('bcn_admin'))
|
|
28 |
*/
|
29 |
class bcn_network_admin extends bcn_admin
|
30 |
{
|
31 |
-
const version = '6.
|
32 |
protected $full_name = 'Breadcrumb NavXT Network Settings';
|
33 |
protected $access_level = 'manage_network_options';
|
34 |
/**
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
28 |
*/
|
29 |
class bcn_network_admin extends bcn_admin
|
30 |
{
|
31 |
+
const version = '6.4.0';
|
32 |
protected $full_name = 'Breadcrumb NavXT Network Settings';
|
33 |
protected $access_level = 'manage_network_options';
|
34 |
/**
|
class.bcn_rest_controller.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2015-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
class.bcn_widget.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2015-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
@@ -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 = '6.
|
23 |
protected $allowed_html = array();
|
24 |
protected $defaults = array('title' => '', 'pretext' => '', 'type' => 'microdata', 'linked' => true, 'reverse' => false, 'front' => false, 'force' => false);
|
25 |
//Default constructor
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
19 |
require_once(dirname(__FILE__) . '/includes/block_direct_access.php');
|
20 |
class bcn_widget extends WP_Widget
|
21 |
{
|
22 |
+
const version = '6.4.0';
|
23 |
protected $allowed_html = array();
|
24 |
protected $defaults = array('title' => '', 'pretext' => '', 'type' => 'microdata', 'linked' => true, 'reverse' => false, 'front' => false, 'force' => false);
|
25 |
//Default constructor
|
includes/block_direct_access.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2015-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
includes/class.mtekk_adminkit.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2015-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
@@ -792,7 +792,7 @@ abstract class mtekk_adminKit
|
|
792 |
$message->render();
|
793 |
}
|
794 |
//Old deprecated messages
|
795 |
-
if(count($this->message))
|
796 |
{
|
797 |
_deprecated_function( __FUNCTION__, '2.0.0', __('adminKit::message is deprecated, use new adminkit_messages instead.', $this->identifier) );
|
798 |
//Loop through our message classes
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
792 |
$message->render();
|
793 |
}
|
794 |
//Old deprecated messages
|
795 |
+
if(is_array($this->message) && count($this->message))
|
796 |
{
|
797 |
_deprecated_function( __FUNCTION__, '2.0.0', __('adminKit::message is deprecated, use new adminkit_messages instead.', $this->identifier) );
|
798 |
//Loop through our message classes
|
includes/class.mtekk_adminkit_message.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2015-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
includes/class.mtekk_adminkit_uninstaller.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2015-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
includes/multibyte_supplicant.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
A small library that adds in fallbacks for some of the PHP multibyte string
|
4 |
functions. Mainly inteneded to be used with Breadcrumb NavXT
|
5 |
|
6 |
-
Copyright 2009-
|
7 |
|
8 |
This program is free software; you can redistribute it and/or modify
|
9 |
it under the terms of the GNU General Public License as published by
|
3 |
A small library that adds in fallbacks for some of the PHP multibyte string
|
4 |
functions. Mainly inteneded to be used with Breadcrumb NavXT
|
5 |
|
6 |
+
Copyright 2009-2020 John Havlik (email : john.havlik@mtekk.us)
|
7 |
|
8 |
This program is free software; you can redistribute it and/or modify
|
9 |
it under the terms of the GNU General Public License as published by
|
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: 4.8
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 6.
|
8 |
Requires PHP: 5.5
|
9 |
License: GPLv2 or later
|
10 |
Adds breadcrumb navigation showing the visitor's path to their current location.
|
@@ -49,6 +49,17 @@ Please visit [Breadcrumb NavXT's Documentation](http://mtekk.us/code/breadcrumb-
|
|
49 |
|
50 |
== Changelog ==
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
= 6.3.0 =
|
53 |
Release date: May, 3rd 2019
|
54 |
|
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: 4.8
|
6 |
+
Tested up to: 5.4.0
|
7 |
+
Stable tag: 6.4.0
|
8 |
Requires PHP: 5.5
|
9 |
License: GPLv2 or later
|
10 |
Adds breadcrumb navigation showing the visitor's path to their current location.
|
49 |
|
50 |
== Changelog ==
|
51 |
|
52 |
+
= 6.4.0 =
|
53 |
+
Release date: December, 31st 2019
|
54 |
+
|
55 |
+
* Behavior change: Attachment post type settings moved to Media, additional post type options made available.
|
56 |
+
* Behavior change: Privately published parent posts are now, by default, skipped over in breadcrumb trails.
|
57 |
+
* Behavior change: On single post breadcrumb trails, the hierarchical term code path is now used in cases where only a single term from a non-hierarchical taxonomy is present for the current post.
|
58 |
+
* New feature: Allow `%link%` tag in unlinked breadcrumb templates.
|
59 |
+
* New feature: Added `bcn_show_post_private` filter.
|
60 |
+
* New feature: Added `bcn_show_type_term_archive` filter.
|
61 |
+
|
62 |
+
|
63 |
= 6.3.0 =
|
64 |
Release date: May, 3rd 2019
|
65 |
|
uninstall.php
CHANGED
@@ -22,7 +22,7 @@
|
|
22 |
* @author Tom Klingenberg
|
23 |
*/
|
24 |
/*
|
25 |
-
Copyright 2010-
|
26 |
|
27 |
This program is free software; you can redistribute it and/or modify
|
28 |
it under the terms of the GNU General Public License as published by
|
22 |
* @author Tom Klingenberg
|
23 |
*/
|
24 |
/*
|
25 |
+
Copyright 2010-2020 John Havlik (email : john.havlik@mtekk.us)
|
26 |
|
27 |
This program is free software; you can redistribute it and/or modify
|
28 |
it under the terms of the GNU General Public License as published by
|