Breadcrumb NavXT - Version 6.3.0

Version Description

Release date: May, 3rd 2019

  • New feature: Added Gutenberg block for displaying breadcrumb trails.
  • New feature: Added bcn_display_attribute_array filter.
  • New feature: Added bcn-aria-current template tag to facilitate WAI-ARIA Breadcrumb support.
  • Bug Fix: Updated settings page to follow WP core standards for header structure.
  • Bug Fix: Updated checkbox in adminKit to eliminate multiple labels to follow WCAG 2.0.
  • Bug Fix: Fixed PHP error in circumstances of bcn_breadcrumb_trail::fill() falling back on treating an unknown item as a taxonomy.
Download this release

Release Info

Developer mtekk
Plugin Icon 128x128 Breadcrumb NavXT
Version 6.3.0
Comparing to
See all releases

Code changes from version 6.2.1 to 6.3.0

bcn_gutenberg_block.js ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * A Gutenberg Breadcrumb Block
3
+ */
4
+ ( function( blocks, components, i18n, element ) {
5
+ const { __ } = wp.i18n;
6
+ const { registerBlockType, InspectorControls } = wp.blocks;
7
+ const { Component } = wp.element;
8
+ const { decodeEntities } = wp.htmlEntities;
9
+ wp.data.use( wp.data.plugins.controls );
10
+ const { data, apiFetch } = wp;
11
+ const { registerStore, withSelect, select, dispatch } = data;
12
+ const el = wp.element.createElement;
13
+ const iconBCN = el('svg', { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
14
+ el('path', { d: "M0.6 7.2C0.4 7.2 0.4 7.2 0.4 7.4V16.9C0.4 17.1 0.4 17.1 0.6 17.1H10.9C11.1 17.1 11.1 17.1 11.3 16.9L16 12.1 11.3 7.4C11.1 7.2 11.1 7.2 10.9 7.2ZM15 7.2 19.9 12.1 15 17.1H18.7C18.9 17.1 18.9 17.1 19.1 16.9L23.8 12.1 19.1 7.4C18.9 7.2 18.9 7.2 18.7 7.2Z" } )
15
+ );
16
+
17
+ const DEFAULT_STATE = {
18
+ breadcrumbTrails: {}
19
+ };
20
+
21
+ const actions = {
22
+ setBreadcrumbTrail( post, breadcrumbTrail) {
23
+ return {
24
+ type: 'SET_BREADCRUMB_TRAIL',
25
+ post,
26
+ breadcrumbTrail,
27
+ }
28
+ },
29
+ fetchFromAPI( path ) {
30
+ return {
31
+ type: 'FETCH_FROM_API',
32
+ path,
33
+ }
34
+ }
35
+ };
36
+
37
+ registerStore('breadcrumb-navxt', {
38
+ reducer( state = DEFAULT_STATE, action ) {
39
+ switch ( action.type ) {
40
+ case 'SET_BREADCRUMB_TRAIL' :
41
+ return {
42
+ ...state,
43
+ breadcrumbTrails: {
44
+ ...state.breadcrumbTrails,
45
+ [ action.post ]: action.breadcrumbTrail,
46
+ },
47
+ };
48
+ }
49
+ return state;
50
+ },
51
+
52
+ actions,
53
+
54
+ selectors: {
55
+ getBreadcrumbTrail( state, post ) {
56
+ const { breadcrumbTrails } = state;
57
+ const breadcrumbTrail = breadcrumbTrails[ post ];
58
+ return breadcrumbTrail;
59
+ },
60
+ },
61
+
62
+ controls: {
63
+ FETCH_FROM_API( action ) {
64
+ return apiFetch( { path: action.path } );
65
+ },
66
+ },
67
+
68
+ resolvers: {
69
+ * getBreadcrumbTrail( post ) {
70
+ const path = '/bcn/v1/post/' + post;
71
+ const breadcrumbTrail = yield actions.fetchFromAPI( path );
72
+ return actions.setBreadcrumbTrail( post, breadcrumbTrail );
73
+ }
74
+ },
75
+ } );
76
+ function renderBreadcrumbTrail( breadcrumbTrail ) {
77
+ var trailString = [];
78
+ const length = breadcrumbTrail.itemListElement.length;
79
+ breadcrumbTrail.itemListElement.forEach( function( listElement, index ) {
80
+ if( index > 0 ) {
81
+ trailString.push( decodeEntities( bcnOpts.hseparator ) );
82
+ }
83
+ if( index < length - 1 || bcnOpts.bcurrent_item_linked) {
84
+ trailString.push( el( 'a', { href: listElement.item['@id'] }, decodeEntities( listElement.item.name ) ) );
85
+ }
86
+ else {
87
+ trailString.push( el( 'span', { }, decodeEntities( listElement.item.name ) ) );
88
+ }
89
+ });
90
+ return trailString;
91
+ }
92
+ function displayBreadcrumbTrail( { breadcrumbTrail } ) {
93
+ if( ! breadcrumbTrail ) {
94
+ return __( 'Loading...', 'breadcrumb-navxt' );
95
+ }
96
+ if( breadcrumbTrail.itemListElement === 0 ) {
97
+ return __( 'No breadcrumb trail', 'breadcrumb-navxt' );
98
+ }
99
+ var breadcrumb = breadcrumbTrail.itemListElement[ 0 ];
100
+ return renderBreadcrumbTrail(breadcrumbTrail);
101
+ }
102
+ registerBlockType( 'bcn/breadcrumb-trail', {
103
+ title: __( 'Breadcrumb Trail', 'breadcrumb-navxt' ),
104
+ description: __( "Display a breadcrumb trail representing this post's location on this website.", 'breadcrumb-navxt'),
105
+ icon: iconBCN,
106
+ category: 'widgets',
107
+
108
+ edit: withSelect( ( select, ownProps ) => {
109
+ const { getBreadcrumbTrail } = select( 'breadcrumb-navxt' );
110
+ return {
111
+ breadcrumbTrail: getBreadcrumbTrail( select( 'core/editor' ).getCurrentPostId() ),
112
+ };
113
+ } )( displayBreadcrumbTrail ),
114
+
115
+ save: function() {
116
+ //Rendering in PHP
117
+ return null;
118
+ },
119
+ } );
120
+ } )(
121
+ window.wp.blocks,
122
+ window.wp.components,
123
+ window.wp.i18n,
124
+ window.wp.element
125
+ );
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&#39;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.2.1
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-2018 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,7 +61,7 @@ $breadcrumb_navxt = null;
61
  //TODO change to extends mtekk_plugKit
62
  class breadcrumb_navxt
63
  {
64
- const version = '6.2.1';
65
  protected $name = 'Breadcrumb NavXT';
66
  protected $identifier = 'breadcrumb-navxt';
67
  protected $unique_prefix = 'bcn';
@@ -85,6 +85,7 @@ class breadcrumb_navxt
85
  $this->plugin_basename = plugin_basename(__FILE__);
86
  //We need to add in the defaults for CPTs and custom taxonomies after all other plugins are loaded
87
  add_action('wp_loaded', array($this, 'wp_loaded'), 15);
 
88
  //Run a little later than everyone else
89
  add_action('init', array($this, 'init'), 11);
90
  //Register the WordPress 2.8 Widget
@@ -120,11 +121,71 @@ class breadcrumb_navxt
120
  require_once(dirname(__FILE__) . '/class.bcn_rest_controller.php');
121
  $this->rest_controller = new bcn_rest_controller($this->breadcrumb_trail, $this->unique_prefix);
122
  }
 
 
 
 
 
 
123
  }
124
  public function register_widget()
125
  {
126
  return register_widget($this->unique_prefix . '_widget');
127
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  public function allowed_html($tags)
129
  {
130
  $allowed_html = array(
@@ -149,7 +210,8 @@ class breadcrumb_navxt
149
  'property' => true,
150
  'vocab' => true,
151
  'translate' => true,
152
- 'lang' => true
 
153
  ),
154
  'img' => array(
155
  'alt' => true,
@@ -299,6 +361,9 @@ class breadcrumb_navxt
299
  {
300
  //Add the necessary option array members
301
  $opts['Hpost_' . $post_type->name . '_template'] = bcn_breadcrumb::get_default_template();
 
 
 
302
  $opts['Hpost_' . $post_type->name . '_template_no_anchor'] = bcn_breadcrumb::default_template_no_anchor;
303
  }
304
  if(!isset($opts['apost_' . $post_type->name . '_root']))
@@ -381,7 +446,7 @@ class breadcrumb_navxt
381
  if(!isset($opts['Htax_' . $taxonomy->name . '_template']))
382
  {
383
  //Add the necessary option array members
384
- $opts['Htax_' . $taxonomy->name . '_template'] = __(sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="Go to the %%title%% %s archives." href="%%link%%" class="%%type%%"><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', $taxonomy->labels->singular_name), 'breadcrumb-navxt');
385
  $opts['Htax_' . $taxonomy->name . '_template_no_anchor'] = __(sprintf('<span property="itemListElement" typeof="ListItem"><span property="name">%%htitle%%</span><meta property="position" content="%%position%%"></span>', $taxonomy->labels->singular_name), 'breadcrumb-navxt');
386
  }
387
  }
@@ -429,6 +494,7 @@ class breadcrumb_navxt
429
  }
430
  //Currently only support using post_parent for the page hierarchy
431
  $this->breadcrumb_trail->opt['bpost_page_hierarchy_display'] = true;
 
432
  $this->breadcrumb_trail->opt['Spost_page_hierarchy_type'] = 'BCN_POST_PARENT';
433
  $this->breadcrumb_trail->opt['apost_page_root'] = get_option('page_on_front');
434
  //This one isn't needed as it is performed in bcn_breadcrumb_trail::fill(), it's here for completeness only
3
  Plugin Name: Breadcrumb NavXT
4
  Plugin URI: http://mtekk.us/code/breadcrumb-navxt/
5
  Description: Adds a breadcrumb navigation showing the visitor&#39;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.3.0
7
  Author: John Havlik
8
  Author URI: http://mtekk.us/
9
  License: GPL2
11
  Domain Path: /languages
12
  */
13
  /*
14
+ Copyright 2007-2019 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.3.0';
65
  protected $name = 'Breadcrumb NavXT';
66
  protected $identifier = 'breadcrumb-navxt';
67
  protected $unique_prefix = 'bcn';
85
  $this->plugin_basename = plugin_basename(__FILE__);
86
  //We need to add in the defaults for CPTs and custom taxonomies after all other plugins are loaded
87
  add_action('wp_loaded', array($this, 'wp_loaded'), 15);
88
+ add_action('rest_api_init', array($this, 'rest_api_init'), 10);
89
  //Run a little later than everyone else
90
  add_action('init', array($this, 'init'), 11);
91
  //Register the WordPress 2.8 Widget
121
  require_once(dirname(__FILE__) . '/class.bcn_rest_controller.php');
122
  $this->rest_controller = new bcn_rest_controller($this->breadcrumb_trail, $this->unique_prefix);
123
  }
124
+ //Register Guternberg
125
+ $this->register_block();
126
+ }
127
+ public function rest_api_init()
128
+ {
129
+ add_filter('bcn_register_rest_endpoint', array($this, 'api_enable_for_block'), 10, 4);
130
  }
131
  public function register_widget()
132
  {
133
  return register_widget($this->unique_prefix . '_widget');
134
  }
135
+ /**
136
+ * Server-side rendering for front-end block display
137
+ *
138
+ * @param array $attributes Array of attributes set by the Gutenberg sidebar
139
+ * @return string The Breadcrumb Trail string
140
+ */
141
+ public function render_block($attributes)
142
+ {
143
+ $extra_classs = '';
144
+ if(isset($attributes['className']))
145
+ {
146
+ $extra_classs = esc_attr($attributes['className']);
147
+ }
148
+ return sprintf('<div class="breadcrumbs %2$s" typeof="BreadcrumbList" vocab="https://schema.org/">%1$s</div>', bcn_display(true), $extra_classs);
149
+ }
150
+ /**
151
+ * Handles registering the Breadcrumb Trail Gutenberg block
152
+ */
153
+ public function register_block()
154
+ {
155
+ wp_register_script($this->unique_prefix . '-breadcrumb-trail-block-script', plugins_url('bcn_gutenberg_block.js', __FILE__), array('wp-blocks', 'wp-element', 'wp-i18n', 'wp-api'));
156
+ if(function_exists('register_block_type'))
157
+ {
158
+ register_block_type( $this->unique_prefix . '/breadcrumb-trail', array(
159
+ 'editor_script' => $this->unique_prefix . '-breadcrumb-trail-block-script',
160
+ 'render_callback' => array($this, 'render_block')
161
+ /*'editor_style' => ''/*,
162
+ 'style' => ''*/
163
+ ));
164
+ if(function_exists('wp_set_script_translations'))
165
+ {
166
+ //Setup our translation strings
167
+ wp_set_script_translations($this->unique_prefix . '-breadcrumb-trail-block-script', 'breadcrumb-navxt');
168
+ }
169
+ //Setup some bcn settings
170
+ //TODO: New settings arch should make this easier
171
+ wp_add_inline_script($this->unique_prefix . '-breadcrumb-trail-block-script',
172
+ $this->unique_prefix . 'Opts = ' . json_encode(
173
+ array(
174
+ 'bcurrent_item_linked' => $this->opt['bcurrent_item_linked'],
175
+ 'hseparator' => $this->opt['hseparator']
176
+ )) . ';',
177
+ 'before');
178
+ }
179
+ }
180
+ public function api_enable_for_block($register_rest_endpoint, $endpoint, $version, $methods)
181
+ {
182
+ //Enable if the current user can edit posts
183
+ if(current_user_can('edit_posts') && $endpoint === 'post')
184
+ {
185
+ return true;
186
+ }
187
+ return $register_rest_endpoint;
188
+ }
189
  public function allowed_html($tags)
190
  {
191
  $allowed_html = array(
210
  'property' => true,
211
  'vocab' => true,
212
  'translate' => true,
213
+ 'lang' => true,
214
+ 'bcn-aria-current' => true
215
  ),
216
  'img' => array(
217
  'alt' => true,
361
  {
362
  //Add the necessary option array members
363
  $opts['Hpost_' . $post_type->name . '_template'] = bcn_breadcrumb::get_default_template();
364
+ }
365
+ if(!isset($opts['Hpost_' . $post_type->name . '_template_no_anchor']))
366
+ {
367
  $opts['Hpost_' . $post_type->name . '_template_no_anchor'] = bcn_breadcrumb::default_template_no_anchor;
368
  }
369
  if(!isset($opts['apost_' . $post_type->name . '_root']))
446
  if(!isset($opts['Htax_' . $taxonomy->name . '_template']))
447
  {
448
  //Add the necessary option array members
449
+ $opts['Htax_' . $taxonomy->name . '_template'] = __(sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="Go to the %%title%% %s archives." href="%%link%%" class="%%type%%" bcn-aria-current><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', $taxonomy->labels->singular_name), 'breadcrumb-navxt');
450
  $opts['Htax_' . $taxonomy->name . '_template_no_anchor'] = __(sprintf('<span property="itemListElement" typeof="ListItem"><span property="name">%%htitle%%</span><meta property="position" content="%%position%%"></span>', $taxonomy->labels->singular_name), 'breadcrumb-navxt');
451
  }
452
  }
494
  }
495
  //Currently only support using post_parent for the page hierarchy
496
  $this->breadcrumb_trail->opt['bpost_page_hierarchy_display'] = true;
497
+ $this->breadcrumb_trail->opt['bpost_page_hierarchy_parent_first'] = true;
498
  $this->breadcrumb_trail->opt['Spost_page_hierarchy_type'] = 'BCN_POST_PARENT';
499
  $this->breadcrumb_trail->opt['apost_page_root'] = get_option('page_on_front');
500
  //This one isn't needed as it is performed in bcn_breadcrumb_trail::fill(), it's here for completeness only
class.bcn_admin.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- Copyright 2015-2018 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,7 +43,7 @@ if(!class_exists('mtekk_adminKit'))
43
  */
44
  class bcn_admin extends mtekk_adminKit
45
  {
46
- const version = '6.2.1';
47
  protected $full_name = 'Breadcrumb NavXT Settings';
48
  protected $short_name = 'Breadcrumb NavXT';
49
  protected $access_level = 'manage_options';
@@ -479,7 +479,7 @@ class bcn_admin extends mtekk_adminKit
479
  //Display our messages
480
  $this->messages();
481
  ?>
482
- <div class="wrap"><h2><?php echo $this->full_name; ?></h2>
483
  <?php
484
  //We exit after the version check if there is an action the user needs to take before saving settings
485
  if(!$this->version_check($this->get_option($this->unique_prefix . '_version')))
@@ -491,15 +491,15 @@ class bcn_admin extends mtekk_adminKit
491
  <?php settings_fields('bcn_options');?>
492
  <div id="hasadmintabs">
493
  <fieldset id="general" class="bcn_options">
494
- <h3 class="tab-title" title="<?php _e('A collection of settings most likely to be modified are located under this tab.', 'breadcrumb-navxt');?>"><?php _e('General', 'breadcrumb-navxt'); ?></h3>
495
- <h3><?php _e('General', 'breadcrumb-navxt'); ?></h3>
496
  <table class="form-table">
497
  <?php
498
  $this->textbox(__('Breadcrumb Separator', 'breadcrumb-navxt'), 'hseparator', '2', false, __('Placed in between each breadcrumb.', 'breadcrumb-navxt'));
499
  do_action($this->unique_prefix . '_settings_general', $this->opt);
500
  ?>
501
  </table>
502
- <h3><?php _e('Current Item', 'breadcrumb-navxt'); ?></h3>
503
  <table class="form-table adminkit-enset-top">
504
  <?php
505
  $this->input_check(__('Link Current Item', 'breadcrumb-navxt'), 'bcurrent_item_linked', __('Yes', 'breadcrumb-navxt'));
@@ -508,23 +508,23 @@ class bcn_admin extends mtekk_adminKit
508
  do_action($this->unique_prefix . '_settings_current_item', $this->opt);
509
  ?>
510
  </table>
511
- <h3><?php _e('Home Breadcrumb', 'breadcrumb-navxt'); ?></h3>
512
  <table class="form-table adminkit-enset-top">
513
- <?php
514
  $this->input_check(__('Home Breadcrumb', 'breadcrumb-navxt'), 'bhome_display', __('Place the home breadcrumb in the trail.', 'breadcrumb-navxt'), false, '', 'adminkit-enset-ctrl adminkit-enset');
515
  $this->textbox(__('Home Template', 'breadcrumb-navxt'), 'Hhome_template', '6', false, __('The template for the home breadcrumb.', 'breadcrumb-navxt'), 'adminkit-enset');
516
  $this->textbox(__('Home Template (Unlinked)', 'breadcrumb-navxt'), 'Hhome_template_no_anchor', '4', false, __('The template for the home breadcrumb, used when the breadcrumb is not linked.', 'breadcrumb-navxt'), 'adminkit-enset');
517
  do_action($this->unique_prefix . '_settings_home', $this->opt);
518
  ?>
519
  </table>
520
- <h3><?php _e('Blog Breadcrumb', 'breadcrumb-navxt'); ?></h3>
521
  <table class="form-table adminkit-enset-top">
522
  <?php
523
  $this->input_check(__('Blog Breadcrumb', 'breadcrumb-navxt'), 'bblog_display', __('Place the blog breadcrumb in the trail.', 'breadcrumb-navxt'), $this->maybe_disable_blog_options(), '', 'adminkit-enset-ctrl adminkit-enset');
524
  do_action($this->unique_prefix . '_settings_blog', $this->opt);
525
  ?>
526
  </table>
527
- <h3><?php _e('Mainsite Breadcrumb', 'breadcrumb-navxt'); ?></h3>
528
  <table class="form-table adminkit-enset-top">
529
  <?php
530
  $this->input_check(__('Main Site Breadcrumb', 'breadcrumb-navxt'), 'bmainsite_display', __('Place the main site home breadcrumb in the trail in an multisite setup.', 'breadcrumb-navxt'), $this->maybe_disable_mainsite_options(), '', 'adminkit-enset-ctrl adminkit-enset');
@@ -536,8 +536,8 @@ class bcn_admin extends mtekk_adminKit
536
  <?php do_action($this->unique_prefix . '_after_settings_tab_general', $this->opt); ?>
537
  </fieldset>
538
  <fieldset id="post" class="bcn_options">
539
- <h3 class="tab-title" title="<?php _e('The settings for all post types (Posts, Pages, and Custom Post Types) are located under this tab.', 'breadcrumb-navxt');?>"><?php _e('Post Types', 'breadcrumb-navxt'); ?></h3>
540
- <h3><?php _e('Posts', 'breadcrumb-navxt'); ?></h3>
541
  <table class="form-table adminkit-enset-top">
542
  <?php
543
  $this->textbox(__('Post Template', 'breadcrumb-navxt'), 'Hpost_post_template', '6', false, __('The template for post breadcrumbs.', 'breadcrumb-navxt'));
@@ -576,7 +576,7 @@ class bcn_admin extends mtekk_adminKit
576
  </td>
577
  </tr>
578
  </table>
579
- <h3><?php _e('Pages', 'breadcrumb-navxt'); ?></h3>
580
  <table class="form-table">
581
  <?php
582
  $this->textbox(__('Page Template', 'breadcrumb-navxt'), 'Hpost_page_template', '6', false, __('The template for page breadcrumbs.', 'breadcrumb-navxt'));
@@ -586,7 +586,7 @@ class bcn_admin extends mtekk_adminKit
586
  $this->input_hidden('Spost_page_hierarchy_type');
587
  ?>
588
  </table>
589
- <h3><?php _e('Attachments', 'breadcrumb-navxt'); ?></h3>
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'));
@@ -607,7 +607,7 @@ class bcn_admin extends mtekk_adminKit
607
  {
608
  $singular_name_lc = mb_strtolower($post_type->labels->singular_name, 'UTF-8');
609
  ?>
610
- <h3><?php echo $post_type->labels->singular_name; ?></h3>
611
  <table class="form-table adminkit-enset-top">
612
  <?php
613
  $this->textbox(sprintf(__('%s Template', 'breadcrumb-navxt'), $post_type->labels->singular_name), 'Hpost_' . $post_type->name . '_template', '6', false, sprintf(__('The template for %s breadcrumbs.', 'breadcrumb-navxt'), $singular_name_lc));
@@ -674,22 +674,22 @@ class bcn_admin extends mtekk_adminKit
674
  ?>
675
  </fieldset>
676
  <fieldset id="tax" class="bcn_options alttab">
677
- <h3 class="tab-title" title="<?php _e('The settings for all taxonomies (including Categories, Tags, and custom taxonomies) are located under this tab.', 'breadcrumb-navxt');?>"><?php _e('Taxonomies', 'breadcrumb-navxt'); ?></h3>
678
- <h3><?php _e('Categories', 'breadcrumb-navxt'); ?></h3>
679
  <table class="form-table">
680
  <?php
681
  $this->textbox(__('Category Template', 'breadcrumb-navxt'), 'Htax_category_template', '6', false, __('The template for category breadcrumbs.', 'breadcrumb-navxt'));
682
  $this->textbox(__('Category Template (Unlinked)', 'breadcrumb-navxt'), 'Htax_category_template_no_anchor', '4', false, __('The template for category breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
683
  ?>
684
  </table>
685
- <h3><?php _e('Tags', 'breadcrumb-navxt'); ?></h3>
686
  <table class="form-table">
687
  <?php
688
  $this->textbox(__('Tag Template', 'breadcrumb-navxt'), 'Htax_post_tag_template', '6', false, __('The template for tag breadcrumbs.', 'breadcrumb-navxt'));
689
  $this->textbox(__('Tag Template (Unlinked)', 'breadcrumb-navxt'), 'Htax_post_tag_template_no_anchor', '4', false, __('The template for tag breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
690
  ?>
691
  </table>
692
- <h3><?php _e('Post Formats', 'breadcrumb-navxt'); ?></h3>
693
  <table class="form-table">
694
  <?php
695
  $this->textbox(__('Post Format Template', 'breadcrumb-navxt'), 'Htax_post_format_template', '6', false, __('The template for post format breadcrumbs.', 'breadcrumb-navxt'));
@@ -723,8 +723,8 @@ class bcn_admin extends mtekk_adminKit
723
  do_action($this->unique_prefix . '_after_settings_tab_taxonomy', $this->opt); ?>
724
  </fieldset>
725
  <fieldset id="miscellaneous" class="bcn_options">
726
- <h3 class="tab-title" title="<?php _e('The settings for author and date archives, searches, and 404 pages are located under this tab.', 'breadcrumb-navxt');?>"><?php _e('Miscellaneous', 'breadcrumb-navxt'); ?></h3>
727
- <h3><?php _e('Author Archives', 'breadcrumb-navxt'); ?></h3>
728
  <table class="form-table">
729
  <?php
730
  $this->textbox(__('Author Template', 'breadcrumb-navxt'), 'Hauthor_template', '6', false, __('The template for author breadcrumbs.', 'breadcrumb-navxt'));
@@ -741,7 +741,7 @@ class bcn_admin extends mtekk_adminKit
741
  </td>
742
  </tr>
743
  </table>
744
- <h3><?php _e('Miscellaneous', 'breadcrumb-navxt'); ?></h3>
745
  <table class="form-table">
746
  <?php
747
  $this->textbox(__('Date Template', 'breadcrumb-navxt'), 'Hdate_template', '6', false, __('The template for date breadcrumbs.', 'breadcrumb-navxt'));
@@ -752,11 +752,11 @@ class bcn_admin extends mtekk_adminKit
752
  $this->textbox(__('404 Template', 'breadcrumb-navxt'), 'H404_template', '4', false, __('The template for 404 breadcrumbs.', 'breadcrumb-navxt'));
753
  ?>
754
  </table>
755
- <h3><?php _e('Deprecated', 'breadcrumb-navxt'); ?></h3>
756
  <table class="form-table">
757
  <tr valign="top">
758
  <th scope="row">
759
- <?php esc_html_e('Title Length', 'breadcrumb-navxt'); ?>
760
  </th>
761
  <td>
762
  <label>
1
  <?php
2
  /*
3
+ Copyright 2015-2019 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.3.0';
47
  protected $full_name = 'Breadcrumb NavXT Settings';
48
  protected $short_name = 'Breadcrumb NavXT';
49
  protected $access_level = 'manage_options';
479
  //Display our messages
480
  $this->messages();
481
  ?>
482
+ <div class="wrap"><h1><?php echo $this->full_name; ?></h1>
483
  <?php
484
  //We exit after the version check if there is an action the user needs to take before saving settings
485
  if(!$this->version_check($this->get_option($this->unique_prefix . '_version')))
491
  <?php settings_fields('bcn_options');?>
492
  <div id="hasadmintabs">
493
  <fieldset id="general" class="bcn_options">
494
+ <legend class="screen-reader-text" data-title="<?php _e( 'A collection of settings most likely to be modified are located under this tab.', 'breadcrumb-navxt' );?>"><?php _e( 'General', 'breadcrumb-navxt' ); ?></legend>
495
+ <h2><?php _e('General', 'breadcrumb-navxt'); ?></h2>
496
  <table class="form-table">
497
  <?php
498
  $this->textbox(__('Breadcrumb Separator', 'breadcrumb-navxt'), 'hseparator', '2', false, __('Placed in between each breadcrumb.', 'breadcrumb-navxt'));
499
  do_action($this->unique_prefix . '_settings_general', $this->opt);
500
  ?>
501
  </table>
502
+ <h2><?php _e('Current Item', 'breadcrumb-navxt'); ?></h2>
503
  <table class="form-table adminkit-enset-top">
504
  <?php
505
  $this->input_check(__('Link Current Item', 'breadcrumb-navxt'), 'bcurrent_item_linked', __('Yes', 'breadcrumb-navxt'));
508
  do_action($this->unique_prefix . '_settings_current_item', $this->opt);
509
  ?>
510
  </table>
511
+ <h2><?php _e('Home Breadcrumb', 'breadcrumb-navxt'); ?></h2>
512
  <table class="form-table adminkit-enset-top">
513
+ <?php
514
  $this->input_check(__('Home Breadcrumb', 'breadcrumb-navxt'), 'bhome_display', __('Place the home breadcrumb in the trail.', 'breadcrumb-navxt'), false, '', 'adminkit-enset-ctrl adminkit-enset');
515
  $this->textbox(__('Home Template', 'breadcrumb-navxt'), 'Hhome_template', '6', false, __('The template for the home breadcrumb.', 'breadcrumb-navxt'), 'adminkit-enset');
516
  $this->textbox(__('Home Template (Unlinked)', 'breadcrumb-navxt'), 'Hhome_template_no_anchor', '4', false, __('The template for the home breadcrumb, used when the breadcrumb is not linked.', 'breadcrumb-navxt'), 'adminkit-enset');
517
  do_action($this->unique_prefix . '_settings_home', $this->opt);
518
  ?>
519
  </table>
520
+ <h2><?php _e('Blog Breadcrumb', 'breadcrumb-navxt'); ?></h2>
521
  <table class="form-table adminkit-enset-top">
522
  <?php
523
  $this->input_check(__('Blog Breadcrumb', 'breadcrumb-navxt'), 'bblog_display', __('Place the blog breadcrumb in the trail.', 'breadcrumb-navxt'), $this->maybe_disable_blog_options(), '', 'adminkit-enset-ctrl adminkit-enset');
524
  do_action($this->unique_prefix . '_settings_blog', $this->opt);
525
  ?>
526
  </table>
527
+ <h2><?php _e('Mainsite Breadcrumb', 'breadcrumb-navxt'); ?></h2>
528
  <table class="form-table adminkit-enset-top">
529
  <?php
530
  $this->input_check(__('Main Site Breadcrumb', 'breadcrumb-navxt'), 'bmainsite_display', __('Place the main site home breadcrumb in the trail in an multisite setup.', 'breadcrumb-navxt'), $this->maybe_disable_mainsite_options(), '', 'adminkit-enset-ctrl adminkit-enset');
536
  <?php do_action($this->unique_prefix . '_after_settings_tab_general', $this->opt); ?>
537
  </fieldset>
538
  <fieldset id="post" class="bcn_options">
539
+ <legend class="screen-reader-text" data-title="<?php _e( 'The settings for all post types (Posts, Pages, and Custom Post Types) are located under this tab.', 'breadcrumb-navxt' );?>"><?php _e( 'Post Types', 'breadcrumb-navxt' ); ?></legend>
540
+ <h2><?php _e('Posts', 'breadcrumb-navxt'); ?></h2>
541
  <table class="form-table adminkit-enset-top">
542
  <?php
543
  $this->textbox(__('Post Template', 'breadcrumb-navxt'), 'Hpost_post_template', '6', false, __('The template for post breadcrumbs.', 'breadcrumb-navxt'));
576
  </td>
577
  </tr>
578
  </table>
579
+ <h2><?php _e('Pages', 'breadcrumb-navxt'); ?></h2>
580
  <table class="form-table">
581
  <?php
582
  $this->textbox(__('Page Template', 'breadcrumb-navxt'), 'Hpost_page_template', '6', false, __('The template for page breadcrumbs.', 'breadcrumb-navxt'));
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'));
607
  {
608
  $singular_name_lc = mb_strtolower($post_type->labels->singular_name, 'UTF-8');
609
  ?>
610
+ <h2><?php echo $post_type->labels->singular_name; ?></h2>
611
  <table class="form-table adminkit-enset-top">
612
  <?php
613
  $this->textbox(sprintf(__('%s Template', 'breadcrumb-navxt'), $post_type->labels->singular_name), 'Hpost_' . $post_type->name . '_template', '6', false, sprintf(__('The template for %s breadcrumbs.', 'breadcrumb-navxt'), $singular_name_lc));
674
  ?>
675
  </fieldset>
676
  <fieldset id="tax" class="bcn_options alttab">
677
+ <legend class="screen-reader-text" data-title="<?php _e( 'The settings for all taxonomies (including Categories, Tags, and custom taxonomies) are located under this tab.', 'breadcrumb-navxt' );?>"><?php _e( 'Taxonomies', 'breadcrumb-navxt' ); ?></legend>
678
+ <h2><?php _e('Categories', 'breadcrumb-navxt'); ?></h2>
679
  <table class="form-table">
680
  <?php
681
  $this->textbox(__('Category Template', 'breadcrumb-navxt'), 'Htax_category_template', '6', false, __('The template for category breadcrumbs.', 'breadcrumb-navxt'));
682
  $this->textbox(__('Category Template (Unlinked)', 'breadcrumb-navxt'), 'Htax_category_template_no_anchor', '4', false, __('The template for category breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
683
  ?>
684
  </table>
685
+ <h2><?php _e('Tags', 'breadcrumb-navxt'); ?></h2>
686
  <table class="form-table">
687
  <?php
688
  $this->textbox(__('Tag Template', 'breadcrumb-navxt'), 'Htax_post_tag_template', '6', false, __('The template for tag breadcrumbs.', 'breadcrumb-navxt'));
689
  $this->textbox(__('Tag Template (Unlinked)', 'breadcrumb-navxt'), 'Htax_post_tag_template_no_anchor', '4', false, __('The template for tag breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
690
  ?>
691
  </table>
692
+ <h2><?php _e('Post Formats', 'breadcrumb-navxt'); ?></h2>
693
  <table class="form-table">
694
  <?php
695
  $this->textbox(__('Post Format Template', 'breadcrumb-navxt'), 'Htax_post_format_template', '6', false, __('The template for post format breadcrumbs.', 'breadcrumb-navxt'));
723
  do_action($this->unique_prefix . '_after_settings_tab_taxonomy', $this->opt); ?>
724
  </fieldset>
725
  <fieldset id="miscellaneous" class="bcn_options">
726
+ <legend class="screen-reader-text" data-title="<?php _e( 'The settings for author and date archives, searches, and 404 pages are located under this tab.', 'breadcrumb-navxt' );?>"><?php _e( 'Miscellaneous', 'breadcrumb-navxt' ); ?></legend>
727
+ <h2><?php _e('Author Archives', 'breadcrumb-navxt'); ?></h2>
728
  <table class="form-table">
729
  <?php
730
  $this->textbox(__('Author Template', 'breadcrumb-navxt'), 'Hauthor_template', '6', false, __('The template for author breadcrumbs.', 'breadcrumb-navxt'));
741
  </td>
742
  </tr>
743
  </table>
744
+ <h2><?php _e('Miscellaneous', 'breadcrumb-navxt'); ?></h2>
745
  <table class="form-table">
746
  <?php
747
  $this->textbox(__('Date Template', 'breadcrumb-navxt'), 'Hdate_template', '6', false, __('The template for date breadcrumbs.', 'breadcrumb-navxt'));
752
  $this->textbox(__('404 Template', 'breadcrumb-navxt'), 'H404_template', '4', false, __('The template for 404 breadcrumbs.', 'breadcrumb-navxt'));
753
  ?>
754
  </table>
755
+ <h2><?php _e('Deprecated', 'breadcrumb-navxt'); ?></h2>
756
  <table class="form-table">
757
  <tr valign="top">
758
  <th scope="row">
759
+ <?php esc_html_e('Title Length', 'breadcrumb-navxt'); ?>
760
  </th>
761
  <td>
762
  <label>
class.bcn_breadcrumb.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- Copyright 2007-2018 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,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.2.1';
25
  //The main text that will be shown
26
  protected $title;
27
  //The breadcrumb's template, used durring assembly
@@ -88,7 +88,7 @@ class bcn_breadcrumb
88
  */
89
  static public function get_default_template()
90
  {
91
- return sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%"><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to %title%.','breadcrumb-navxt'));
92
  }
93
  /**
94
  * Function to set the protected title member
@@ -213,11 +213,20 @@ class bcn_breadcrumb
213
  *
214
  * @param bool $linked Allow the output to contain anchors?
215
  * @param int $position The position of the breadcrumb in the trail (between 1 and n when there are n breadcrumbs in the trail)
 
216
  *
217
  * @return string The compiled breadcrumb string
218
  */
219
- public function assemble($linked, $position)
220
  {
 
 
 
 
 
 
 
 
221
  //Build our replacements array
222
  $replacements = array(
223
  '%title%' => esc_attr(strip_tags($this->title)),
@@ -226,7 +235,8 @@ class bcn_breadcrumb
226
  '%type%' => apply_filters('bcn_breadcrumb_types', $this->type, $this->id),
227
  '%ftitle%' => esc_attr(strip_tags($this->_title)),
228
  '%fhtitle%' => $this->_title,
229
- '%position%' => $position
 
230
  );
231
  //The type may be an array, implode it if that is the case
232
  if(is_array($replacements['%type%']))
1
  <?php
2
  /*
3
+ Copyright 2007-2019 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.3.0';
25
  //The main text that will be shown
26
  protected $title;
27
  //The breadcrumb's template, used durring assembly
88
  */
89
  static public function get_default_template()
90
  {
91
+ return sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%" bcn-aria-current><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to %title%.','breadcrumb-navxt'));
92
  }
93
  /**
94
  * Function to set the protected title member
213
  *
214
  * @param bool $linked Allow the output to contain anchors?
215
  * @param int $position The position of the breadcrumb in the trail (between 1 and n when there are n breadcrumbs in the trail)
216
+ * @param bool $is_current_item Whether or not this breadcrumb represents the current item
217
  *
218
  * @return string The compiled breadcrumb string
219
  */
220
+ public function assemble($linked, $position, $is_current_item = false)
221
  {
222
+ if($is_current_item)
223
+ {
224
+ $aria_current_str = 'aria-current="page"';
225
+ }
226
+ else
227
+ {
228
+ $aria_current_str = '';
229
+ }
230
  //Build our replacements array
231
  $replacements = array(
232
  '%title%' => esc_attr(strip_tags($this->title)),
235
  '%type%' => apply_filters('bcn_breadcrumb_types', $this->type, $this->id),
236
  '%ftitle%' => esc_attr(strip_tags($this->_title)),
237
  '%fhtitle%' => $this->_title,
238
+ '%position%' => $position,
239
+ 'bcn-aria-current' => $aria_current_str
240
  );
241
  //The type may be an array, implode it if that is the case
242
  if(is_array($replacements['%type%']))
class.bcn_breadcrumb_trail.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- Copyright 2015-2018 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,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.2.1';
25
  //An array of breadcrumbs
26
  public $breadcrumbs = array();
27
  public $trail = array();
@@ -115,55 +115,43 @@ class bcn_breadcrumb_trail
115
  //The breadcrumb template for search breadcrumbs
116
  'Hsearch_template' => sprintf('<span property="itemListElement" typeof="ListItem"><span property="name">%1$s</span><meta property="position" content="%%position%%"></span>',
117
  sprintf(esc_attr__('Search results for &#39;%1$s&#39;', 'breadcrumb-navxt'),
118
- sprintf('<a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%">%%htitle%%</a>', esc_attr__('Go to the first page of search results for %title%.', 'breadcrumb-navxt')))),
119
  //The breadcrumb template for search breadcrumbs, used when an anchor is not necessary
120
  'Hsearch_template_no_anchor' => sprintf('<span class="%%type%%">%1$s</span>',
121
  sprintf(esc_attr__('Search results for &#39;%1$s&#39;', 'breadcrumb-navxt'), '%htitle%')),
122
  //Tag related stuff
123
  //The breadcrumb template for tag breadcrumbs
124
- 'Htax_post_tag_template' => sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%"><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to the %title% tag archives.', 'breadcrumb-navxt')),
125
  //The breadcrumb template for tag breadcrumbs, used when an anchor is not necessary
126
  'Htax_post_tag_template_no_anchor' => bcn_breadcrumb::default_template_no_anchor,
127
  //Post format related stuff
128
  //The breadcrumb template for post format breadcrumbs, used when an anchor is not necessary
129
- 'Htax_post_format_template' => sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%"><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to the %title% archives.', 'breadcrumb-navxt')),
130
  //The breadcrumb template for post format breadcrumbs
131
  'Htax_post_format_template_no_anchor' => bcn_breadcrumb::default_template_no_anchor,
132
  //Author page stuff
133
  //The anchor template for author breadcrumbs
134
  'Hauthor_template' => sprintf('<span property="itemListElement" typeof="ListItem"><span property="name">%1$s</span><meta property="position" content="%%position%%"></span>',
135
- sprintf(esc_attr__('Articles by: %1$s', 'breacrumb-navxt'),
136
- sprintf('<a title="%1$s" href="%%link%%" class="%%type%%">%%htitle%%</a>', esc_attr__('Go to the first page of posts by %title%.', 'breadcrumb-navxt')))),
137
  //The anchor template for author breadcrumbs, used when anchors are not needed
138
  'Hauthor_template_no_anchor' => sprintf('<span class="%%type%%">%1$s</span>',
139
- sprintf(esc_attr__('Articles by: %1$s', 'breacrumb-navxt'), '%htitle%')),
140
  //Which of the various WordPress display types should the author breadcrumb display
141
  'Sauthor_name' => 'display_name',
142
  //Give an invlaid page ID for the author root
143
  'aauthor_root' => 0,
144
  //Category stuff
145
  //The breadcrumb template for category breadcrumbs
146
- 'Htax_category_template' => sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%"><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to the %title% category archives.', 'breadcrumb-navxt')),
147
  //The breadcrumb template for category breadcrumbs, used when anchors are not needed
148
  'Htax_category_template_no_anchor' => bcn_breadcrumb::default_template_no_anchor,
149
  //The breadcrumb template for date breadcrumbs
150
- 'Hdate_template' => sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%"><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to the %title% archives.', 'breadcrumb-navxt')),
151
  //The breadcrumb template for date breadcrumbs, used when anchors are not needed
152
  'Hdate_template_no_anchor' => bcn_breadcrumb::default_template_no_anchor
153
  );
154
  }
155
- /**
156
- * This returns the internal version
157
- *
158
- * @deprecated 5.2.0 No longer needed, superceeded bcn_breadcrumb_trail::version
159
- *
160
- * @return string internal version of the Breadcrumb trail
161
- */
162
- public function get_version()
163
- {
164
- _deprecated_function( __FUNCTION__, '5.2', 'bcn_breadcrumb_trail::version' );
165
- return self::version;
166
- }
167
  /**
168
  * Adds a breadcrumb to the breadcrumb trail
169
  *
@@ -537,18 +525,6 @@ class bcn_breadcrumb_trail
537
  $this->post_hierarchy($post->ID, $post->post_type, $post->post_parent);
538
  }
539
  }
540
- /**
541
- * A Breadcrumb Trail Filling Function
542
- *
543
- * @deprecated 6.0.0 No longer needed, superceeded by do_post
544
- *
545
- * This functions fills a breadcrumb for an attachment page.
546
- */
547
- protected function do_attachment()
548
- {
549
- _deprecated_function( __FUNCTION__, '6.0', 'bcn_breadcrumb_trail::do_post');
550
- $this->do_post(get_post());
551
- }
552
  /**
553
  * A Breadcrumb Trail Filling Function
554
  *
@@ -661,30 +637,6 @@ class bcn_breadcrumb_trail
661
  $breadcrumb->set_url($this->maybe_add_post_type_arg($url, $type));
662
  }
663
  }
664
- /**
665
- * A Breadcrumb Trail Filling Function
666
- *
667
- * This functions fills a breadcrumb for a date archive.
668
- *
669
- * @param string $type The type to restrict the date archives to
670
- *
671
- * @deprecated 6.0.0 No longer needed, superceeded by do_day, do_month, and/or do_year
672
- */
673
- protected function do_archive_by_date($type)
674
- {
675
- _deprecated_function( __FUNCTION__, '6.0', 'bcn_breadcrumb_trail::do_day, bcn_breadcrumb_trail::do_month, and/or bcn_breadcrumb_trail::do_year');
676
- //First deal with the day breadcrumb
677
- if(is_day() || is_single())
678
- {
679
- $this->do_day(get_post(), $type, is_paged(), is_day());
680
- }
681
- //Now deal with the month breadcrumb
682
- if(is_month() || is_day() || is_single())
683
- {
684
- $this->do_month(get_post(), $type, is_paged(), is_month());
685
- }
686
- $this->do_year(get_post(), $type, is_paged(), is_year());
687
- }
688
  /**
689
  * A Breadcrumb Trail Filling Function
690
  *
@@ -979,7 +931,7 @@ class bcn_breadcrumb_trail
979
  */
980
  public function fill()
981
  {
982
- global $wpdb, $wp_query, $wp;
983
  //Check to see if the trail is already populated
984
  if(count($this->breadcrumbs) > 0)
985
  {
@@ -1189,22 +1141,6 @@ class bcn_breadcrumb_trail
1189
  $trail_str = $this->display_loop($linked, $reverse, $template);
1190
  return $trail_str;
1191
  }
1192
- /**
1193
- * This functions outputs or returns the breadcrumb trail in list form.
1194
- *
1195
- * @deprecated 6.0.0 No longer needed, superceeded by $template parameter in display
1196
- *
1197
- * @param bool $linked[optional] Whether to allow hyperlinks in the trail or not.
1198
- * @param bool $reverse[optional] Whether to reverse the output or not.
1199
- *
1200
- * @return void Void if option to print out breadcrumb trail was chosen.
1201
- * @return string String version of the breadcrumb trail.
1202
- */
1203
- public function display_list($linked = true, $reverse = false)
1204
- {
1205
- _deprecated_function( __FUNCTION__, '6.0', 'bcn_breadcrumb_trail::display');
1206
- return $this->display($return, $linked, $reverse, "<li%3\$s>%1\$s</li>\n");
1207
- }
1208
  /**
1209
  * This function assembles the breadcrumbs in the breadcrumb trail in accordance with the passed in template
1210
  *
@@ -1224,7 +1160,8 @@ class bcn_breadcrumb_trail
1224
  {
1225
  $types = $breadcrumb->get_types();
1226
  array_walk($types, 'sanitize_html_class');
1227
- $class = sprintf(' class="%s"', esc_attr(implode(' ', $types)));
 
1228
  //Deal with the separator
1229
  if($position < $last_position)
1230
  {
@@ -1234,17 +1171,24 @@ class bcn_breadcrumb_trail
1234
  {
1235
  $separator = '';
1236
  }
 
 
 
 
 
 
 
1237
  //Filter li_attributes adding attributes to the li element
1238
- $attribs = apply_filters_deprecated('bcn_li_attributes', array($class, $breadcrumb->get_types(), $breadcrumb->get_id()), '6.0.0', 'bcn_display_attributes');
1239
- $attribs = apply_filters('bcn_display_attributes', $class, $breadcrumb->get_types(), $breadcrumb->get_id());
1240
  //Trim titles, if requested
1241
  if($this->opt['blimit_title'] && $this->opt['amax_title_length'] > 0)
1242
  {
1243
  //Trim the breadcrumb's title
1244
  $breadcrumb->title_trim($this->opt['amax_title_length']);
1245
  }
1246
- //Assemble the breadrumb and wrap with li's
1247
- $trail_str .= sprintf($template, $breadcrumb->assemble($linked, $position), $separator, $attribs);
1248
  $position++;
1249
  }
1250
  return $trail_str;
@@ -1284,4 +1228,71 @@ class bcn_breadcrumb_trail
1284
  }
1285
  return $breadcrumbs;
1286
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1287
  }
1
  <?php
2
  /*
3
+ Copyright 2015-2019 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.3.0';
25
  //An array of breadcrumbs
26
  public $breadcrumbs = array();
27
  public $trail = array();
115
  //The breadcrumb template for search breadcrumbs
116
  'Hsearch_template' => sprintf('<span property="itemListElement" typeof="ListItem"><span property="name">%1$s</span><meta property="position" content="%%position%%"></span>',
117
  sprintf(esc_attr__('Search results for &#39;%1$s&#39;', 'breadcrumb-navxt'),
118
+ sprintf('<a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%" bcn-aria-current>%%htitle%%</a>', esc_attr__('Go to the first page of search results for %title%.', 'breadcrumb-navxt')))),
119
  //The breadcrumb template for search breadcrumbs, used when an anchor is not necessary
120
  'Hsearch_template_no_anchor' => sprintf('<span class="%%type%%">%1$s</span>',
121
  sprintf(esc_attr__('Search results for &#39;%1$s&#39;', 'breadcrumb-navxt'), '%htitle%')),
122
  //Tag related stuff
123
  //The breadcrumb template for tag breadcrumbs
124
+ 'Htax_post_tag_template' => sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%" bcn-aria-current><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to the %title% tag archives.', 'breadcrumb-navxt')),
125
  //The breadcrumb template for tag breadcrumbs, used when an anchor is not necessary
126
  'Htax_post_tag_template_no_anchor' => bcn_breadcrumb::default_template_no_anchor,
127
  //Post format related stuff
128
  //The breadcrumb template for post format breadcrumbs, used when an anchor is not necessary
129
+ 'Htax_post_format_template' => sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%" bcn-aria-current><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to the %title% archives.', 'breadcrumb-navxt')),
130
  //The breadcrumb template for post format breadcrumbs
131
  'Htax_post_format_template_no_anchor' => bcn_breadcrumb::default_template_no_anchor,
132
  //Author page stuff
133
  //The anchor template for author breadcrumbs
134
  'Hauthor_template' => sprintf('<span property="itemListElement" typeof="ListItem"><span property="name">%1$s</span><meta property="position" content="%%position%%"></span>',
135
+ sprintf(esc_attr__('Articles by: %1$s', 'breadcrumb-navxt'),
136
+ sprintf('<a title="%1$s" href="%%link%%" class="%%type%%" bcn-aria-current>%%htitle%%</a>', esc_attr__('Go to the first page of posts by %title%.', 'breadcrumb-navxt')))),
137
  //The anchor template for author breadcrumbs, used when anchors are not needed
138
  'Hauthor_template_no_anchor' => sprintf('<span class="%%type%%">%1$s</span>',
139
+ sprintf(esc_attr__('Articles by: %1$s', 'breadcrumb-navxt'), '%htitle%')),
140
  //Which of the various WordPress display types should the author breadcrumb display
141
  'Sauthor_name' => 'display_name',
142
  //Give an invlaid page ID for the author root
143
  'aauthor_root' => 0,
144
  //Category stuff
145
  //The breadcrumb template for category breadcrumbs
146
+ 'Htax_category_template' => sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%" bcn-aria-current><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to the %title% category archives.', 'breadcrumb-navxt')),
147
  //The breadcrumb template for category breadcrumbs, used when anchors are not needed
148
  'Htax_category_template_no_anchor' => bcn_breadcrumb::default_template_no_anchor,
149
  //The breadcrumb template for date breadcrumbs
150
+ 'Hdate_template' => sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%" bcn-aria-current><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to the %title% archives.', 'breadcrumb-navxt')),
151
  //The breadcrumb template for date breadcrumbs, used when anchors are not needed
152
  'Hdate_template_no_anchor' => bcn_breadcrumb::default_template_no_anchor
153
  );
154
  }
 
 
 
 
 
 
 
 
 
 
 
 
155
  /**
156
  * Adds a breadcrumb to the breadcrumb trail
157
  *
525
  $this->post_hierarchy($post->ID, $post->post_type, $post->post_parent);
526
  }
527
  }
 
 
 
 
 
 
 
 
 
 
 
 
528
  /**
529
  * A Breadcrumb Trail Filling Function
530
  *
637
  $breadcrumb->set_url($this->maybe_add_post_type_arg($url, $type));
638
  }
639
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
640
  /**
641
  * A Breadcrumb Trail Filling Function
642
  *
931
  */
932
  public function fill()
933
  {
934
+ global $wpdb, $wp_query, $wp, $wp_taxonomies;
935
  //Check to see if the trail is already populated
936
  if(count($this->breadcrumbs) > 0)
937
  {
1141
  $trail_str = $this->display_loop($linked, $reverse, $template);
1142
  return $trail_str;
1143
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1144
  /**
1145
  * This function assembles the breadcrumbs in the breadcrumb trail in accordance with the passed in template
1146
  *
1160
  {
1161
  $types = $breadcrumb->get_types();
1162
  array_walk($types, 'sanitize_html_class');
1163
+ $attrib_array = array('class' => $types);
1164
+ $attribs = '';
1165
  //Deal with the separator
1166
  if($position < $last_position)
1167
  {
1171
  {
1172
  $separator = '';
1173
  }
1174
+ //Allow others to hook into the attribute array
1175
+ $attrib_array= apply_filters('bcn_display_attribute_array', $attrib_array, $breadcrumb->get_types(), $breadcrumb->get_id());
1176
+ //Stringify the array
1177
+ foreach($attrib_array as $attrib => $value)
1178
+ {
1179
+ $attribs .= sprintf(' %1$s="%2$s"', esc_attr($attrib), esc_attr(implode(' ', $value)));
1180
+ }
1181
  //Filter li_attributes adding attributes to the li element
1182
+ $attribs = apply_filters_deprecated('bcn_li_attributes', array($attribs, $breadcrumb->get_types(), $breadcrumb->get_id()), '6.0.0', 'bcn_display_attributes');
1183
+ $attribs = apply_filters('bcn_display_attributes', $attribs, $breadcrumb->get_types(), $breadcrumb->get_id());
1184
  //Trim titles, if requested
1185
  if($this->opt['blimit_title'] && $this->opt['amax_title_length'] > 0)
1186
  {
1187
  //Trim the breadcrumb's title
1188
  $breadcrumb->title_trim($this->opt['amax_title_length']);
1189
  }
1190
+ //Assemble the breadcrumb
1191
+ $trail_str .= sprintf($template, $breadcrumb->assemble($linked, $position, ($key === 0)), $separator, $attribs);
1192
  $position++;
1193
  }
1194
  return $trail_str;
1228
  }
1229
  return $breadcrumbs;
1230
  }
1231
+ /**
1232
+ * Deprecated functions, don't use these
1233
+ */
1234
+ /**
1235
+ * This returns the internal version
1236
+ *
1237
+ * @deprecated 5.2.0 No longer needed, superceeded bcn_breadcrumb_trail::version
1238
+ *
1239
+ * @return string internal version of the Breadcrumb trail
1240
+ */
1241
+ public function get_version()
1242
+ {
1243
+ _deprecated_function( __FUNCTION__, '5.2', 'bcn_breadcrumb_trail::version' );
1244
+ return self::version;
1245
+ }
1246
+ /**
1247
+ * A Breadcrumb Trail Filling Function
1248
+ *
1249
+ * @deprecated 6.0.0 No longer needed, superceeded by do_post
1250
+ *
1251
+ * This functions fills a breadcrumb for an attachment page.
1252
+ */
1253
+ protected function do_attachment()
1254
+ {
1255
+ _deprecated_function( __FUNCTION__, '6.0', 'bcn_breadcrumb_trail::do_post');
1256
+ $this->do_post(get_post());
1257
+ }
1258
+ /**
1259
+ * A Breadcrumb Trail Filling Function
1260
+ *
1261
+ * This functions fills a breadcrumb for a date archive.
1262
+ *
1263
+ * @param string $type The type to restrict the date archives to
1264
+ *
1265
+ * @deprecated 6.0.0 No longer needed, superceeded by do_day, do_month, and/or do_year
1266
+ */
1267
+ protected function do_archive_by_date($type)
1268
+ {
1269
+ _deprecated_function( __FUNCTION__, '6.0', 'bcn_breadcrumb_trail::do_day, bcn_breadcrumb_trail::do_month, and/or bcn_breadcrumb_trail::do_year');
1270
+ //First deal with the day breadcrumb
1271
+ if(is_day() || is_single())
1272
+ {
1273
+ $this->do_day(get_post(), $type, is_paged(), is_day());
1274
+ }
1275
+ //Now deal with the month breadcrumb
1276
+ if(is_month() || is_day() || is_single())
1277
+ {
1278
+ $this->do_month(get_post(), $type, is_paged(), is_month());
1279
+ }
1280
+ $this->do_year(get_post(), $type, is_paged(), is_year());
1281
+ }
1282
+ /**
1283
+ * This functions outputs or returns the breadcrumb trail in list form.
1284
+ *
1285
+ * @deprecated 6.0.0 No longer needed, superceeded by $template parameter in display
1286
+ *
1287
+ * @param bool $linked[optional] Whether to allow hyperlinks in the trail or not.
1288
+ * @param bool $reverse[optional] Whether to reverse the output or not.
1289
+ *
1290
+ * @return void Void if option to print out breadcrumb trail was chosen.
1291
+ * @return string String version of the breadcrumb trail.
1292
+ */
1293
+ public function display_list($linked = true, $reverse = false)
1294
+ {
1295
+ _deprecated_function( __FUNCTION__, '6.0', 'bcn_breadcrumb_trail::display');
1296
+ return $this->display($linked, $reverse, "<li%3\$s>%1\$s</li>\n");
1297
+ }
1298
  }
class.bcn_network_admin.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- Copyright 2015-2018 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,7 +28,7 @@ if(!class_exists('bcn_admin'))
28
  */
29
  class bcn_network_admin extends bcn_admin
30
  {
31
- const version = '6.2.1';
32
  protected $full_name = 'Breadcrumb NavXT Network Settings';
33
  protected $access_level = 'manage_network_options';
34
  /**
1
  <?php
2
  /*
3
+ Copyright 2015-2019 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.3.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-2018 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
1
  <?php
2
  /*
3
+ Copyright 2015-2019 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-2018 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,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.2.1';
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-2019 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.3.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-2018 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
1
  <?php
2
  /*
3
+ Copyright 2015-2019 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-2018 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
@@ -865,6 +865,7 @@ abstract class mtekk_adminKit
865
  $form .= sprintf('<form action="options-general.php?page=%s" method="post" enctype="multipart/form-data" id="%s_admin_upload">', esc_attr($this->identifier), esc_attr($this->unique_prefix));
866
  $form .= wp_nonce_field($this->unique_prefix . '_admin_import_export', '_wpnonce', true, false);
867
  $form .= sprintf('<fieldset id="import_export" class="%s_options">', esc_attr($this->unique_prefix));
 
868
  $form .= '<p>' . esc_html__('Import settings from a XML file, export the current settings to a XML file, or reset to the default settings.', $this->identifier) . '</p>';
869
  $form .= '<table class="form-table"><tr valign="top"><th scope="row">';
870
  $form .= sprintf('<label for="%s_admin_import_file">', esc_attr($this->unique_prefix));
@@ -1054,10 +1055,10 @@ abstract class mtekk_adminKit
1054
  }?>
1055
  <tr valign="top">
1056
  <th scope="row">
1057
- <?php $this->label($opt_id, $label);?>
1058
  </th>
1059
- <td>
1060
- <label>
1061
  <?php printf('<input type="checkbox" name="%1$s" id="%2$s" value="%3$s" class="%4$s" %5$s %6$s/>', esc_attr($opt_name), esc_attr($opt_id), esc_attr($this->opt[$option]), esc_attr($class), disabled($disable, true, false), checked($this->opt[$option], true, false));?>
1062
  <?php echo $instruction; ?>
1063
  </label><br />
1
  <?php
2
  /*
3
+ Copyright 2015-2019 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
865
  $form .= sprintf('<form action="options-general.php?page=%s" method="post" enctype="multipart/form-data" id="%s_admin_upload">', esc_attr($this->identifier), esc_attr($this->unique_prefix));
866
  $form .= wp_nonce_field($this->unique_prefix . '_admin_import_export', '_wpnonce', true, false);
867
  $form .= sprintf('<fieldset id="import_export" class="%s_options">', esc_attr($this->unique_prefix));
868
+ $form .= '<legend class="screen-reader-text">' . esc_html__( 'Import settings', $this->identifier ) . '</legend>';
869
  $form .= '<p>' . esc_html__('Import settings from a XML file, export the current settings to a XML file, or reset to the default settings.', $this->identifier) . '</p>';
870
  $form .= '<table class="form-table"><tr valign="top"><th scope="row">';
871
  $form .= sprintf('<label for="%s_admin_import_file">', esc_attr($this->unique_prefix));
1055
  }?>
1056
  <tr valign="top">
1057
  <th scope="row">
1058
+ <?php echo esc_html( $label ); ?>
1059
  </th>
1060
+ <td>
1061
+ <label for="<?php echo esc_attr( $opt_id ); ?>">
1062
  <?php printf('<input type="checkbox" name="%1$s" id="%2$s" value="%3$s" class="%4$s" %5$s %6$s/>', esc_attr($opt_name), esc_attr($opt_id), esc_attr($this->opt[$option]), esc_attr($class), disabled($disable, true, false), checked($this->opt[$option], true, false));?>
1063
  <?php echo $instruction; ?>
1064
  </label><br />
includes/class.mtekk_adminkit_message.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- Copyright 2015-2018 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
1
  <?php
2
  /*
3
+ Copyright 2015-2019 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-2018 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
1
  <?php
2
  /*
3
+ Copyright 2015-2019 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/mtekk_adminkit_tabs.js CHANGED
@@ -12,10 +12,9 @@ function mtekk_admin_tabulator_init(){
12
  jQuery('#hasadmintabs > fieldset').each(function(i){
13
  id = jQuery(this).attr('id');
14
  cssc = jQuery(this).attr('class');
15
- title = jQuery(this).find('h3.tab-title').attr('title');
16
- caption = jQuery(this).find('h3.tab-title').text();
17
  jQuery('#hasadmintabs > ul').append('<li><a href="#'+id+'" class="nav-tab '+cssc+'" title="'+title+'"><span>'+caption+"<\/span><\/a><\/li>");
18
- jQuery(this).find('h3.tab-title').hide();
19
  });
20
  var form = jQuery('#'+objectL10n.mtad_uid+'-options');
21
  /* init the tabs plugin */
12
  jQuery('#hasadmintabs > fieldset').each(function(i){
13
  id = jQuery(this).attr('id');
14
  cssc = jQuery(this).attr('class');
15
+ title = jQuery(this).find('legend').data('title');
16
+ caption = jQuery(this).find('legend').text();
17
  jQuery('#hasadmintabs > ul').append('<li><a href="#'+id+'" class="nav-tab '+cssc+'" title="'+title+'"><span>'+caption+"<\/span><\/a><\/li>");
 
18
  });
19
  var form = jQuery('#'+objectL10n.mtad_uid+'-options');
20
  /* init the tabs plugin */
includes/mtekk_adminkit_tabs.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(){mtekk_admin_tabulator_init()});function mtekk_admin_tabulator_init(){if(!jQuery("#hasadmintabs").length){return}jQuery("#hasadmintabs").prepend('<ul class="nav-tab-wrapper"></ul>');jQuery("#hasadmintabs > fieldset").each(function(c){id=jQuery(this).attr("id");cssc=jQuery(this).attr("class");title=jQuery(this).find("h3.tab-title").attr("title");caption=jQuery(this).find("h3.tab-title").text();jQuery("#hasadmintabs > ul").append('<li><a href="#'+id+'" class="nav-tab '+cssc+'" title="'+title+'"><span>'+caption+"</span></a></li>");jQuery(this).find("h3.tab-title").hide()});var b=jQuery("#"+objectL10n.mtad_uid+"-options");var a=jQuery("#hasadmintabs").tabs({beforeActivate:function(c,e){b.find("input").each(function(){if(!this.checkValidity()){b.find(":submit").click();c.preventDefault()}});var d=b.attr("action").split("#",1)+"#"+e.newPanel[0].id;b.get(0).setAttribute("action",d)},create:function(c,e){var d=b.attr("action").split("#",1)+"#"+e.panel[0].id;b.get(0).setAttribute("action",d)}})};
1
+ function mtekk_admin_tabulator_init(){if(jQuery("#hasadmintabs").length){jQuery("#hasadmintabs").prepend('<ul class="nav-tab-wrapper"></ul>'),jQuery("#hasadmintabs > fieldset").each(function(t){id=jQuery(this).attr("id"),cssc=jQuery(this).attr("class"),title=jQuery(this).find("legend").data("title"),caption=jQuery(this).find("legend").text(),jQuery("#hasadmintabs > ul").append('<li><a href="#'+id+'" class="nav-tab '+cssc+'" title="'+title+'"><span>'+caption+"</span></a></li>")});var e=jQuery("#"+objectL10n.mtad_uid+"-options");jQuery("#hasadmintabs").tabs({beforeActivate:function(t,a){e.find("input").each(function(){this.checkValidity()||(e.find(":submit").click(),t.preventDefault())});var i=e.attr("action").split("#",1)+"#"+a.newPanel[0].id;e.get(0).setAttribute("action",i)},create:function(t,a){var i=e.attr("action").split("#",1)+"#"+a.panel[0].id;e.get(0).setAttribute("action",i)}})}}jQuery(function(){mtekk_admin_tabulator_init()});
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-2018 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
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-2019 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
@@ -2,10 +2,10 @@
2
  Contributors: mtekk, hakre
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FD5XEU783BR8U&lc=US&item_name=Breadcrumb%20NavXT%20Donation&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
4
  Tags: breadcrumb, breadcrumbs, trail, navigation, menu, widget
5
- Requires at least: 4.7
6
- Tested up to: 5.0.0
7
- Stable tag: 6.2.1
8
- Requires PHP: 5.3
9
  License: GPLv2 or later
10
  Adds breadcrumb navigation showing the visitor's path to their current location.
11
 
@@ -49,6 +49,16 @@ Please visit [Breadcrumb NavXT's Documentation](http://mtekk.us/code/breadcrumb-
49
 
50
  == Changelog ==
51
 
 
 
 
 
 
 
 
 
 
 
52
  = 6.2.1 =
53
  Release date: October, 26th 2018
54
 
@@ -125,8 +135,8 @@ Release date: December, 26th 2017
125
  * Bug fix: Removed use of `create_function` in registering the widget as it was deprecated in PHP 7.2.
126
 
127
  == Upgrade Notice ==
128
- = 6.0.0 =
129
- This version requires PHP5.3 or newer. This version introduces three new filters and deprecates a filter.
130
 
131
- = 5.6.0 =
132
- This version requires PHP5.3 or newer. This version introduces a new 4th optional parameter to `bcn_display()` and `bcn_display_list()` that bypasses the internal caching mechanism.
2
  Contributors: mtekk, hakre
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FD5XEU783BR8U&lc=US&item_name=Breadcrumb%20NavXT%20Donation&currency_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.2.0
7
+ Stable tag: 6.3.0
8
+ Requires PHP: 5.5
9
  License: GPLv2 or later
10
  Adds breadcrumb navigation showing the visitor's path to their current location.
11
 
49
 
50
  == Changelog ==
51
 
52
+ = 6.3.0 =
53
+ Release date: May, 3rd 2019
54
+
55
+ * New feature: Added Gutenberg block for displaying breadcrumb trails.
56
+ * New feature: Added `bcn_display_attribute_array` filter.
57
+ * New feature: Added `bcn-aria-current` template tag to facilitate WAI-ARIA Breadcrumb support.
58
+ * Bug Fix: Updated settings page to follow WP core standards for header structure.
59
+ * Bug Fix: Updated checkbox in adminKit to eliminate multiple labels to follow WCAG 2.0.
60
+ * Bug Fix: Fixed PHP error in circumstances of `bcn_breadcrumb_trail::fill()` falling back on treating an unknown item as a taxonomy.
61
+
62
  = 6.2.1 =
63
  Release date: October, 26th 2018
64
 
135
  * Bug fix: Removed use of `create_function` in registering the widget as it was deprecated in PHP 7.2.
136
 
137
  == Upgrade Notice ==
138
+ = 6.3.0 =
139
+ This version requires PHP5.5 or newer. This version introduces a Gutenberg Breadcrumb Trail block.
140
 
141
+ = 6.0.0 =
142
+ This version requires PHP5.3 or newer. This version introduces three new filters and deprecates a filter.
uninstall.php CHANGED
@@ -22,7 +22,7 @@
22
  * @author Tom Klingenberg
23
  */
24
  /*
25
- Copyright 2010-2018 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
22
  * @author Tom Klingenberg
23
  */
24
  /*
25
+ Copyright 2010-2019 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