Breadcrumb NavXT - Version 3.0.1

Version Description

Download this release

Release Info

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

Code changes from version 3.0.0 to 3.0.1

breadcrumb_navxt_admin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Breadcrumb NavXT - Adminstration Interface
4
  Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
5
  Description: Adds a breadcrumb navigation showing the visitor&#39;s path to their current location. This enables the administrative interface for specifying the output of the breadcrumb trail. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
6
- Version: 3.0.0
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
@@ -44,7 +44,7 @@ class bcn_admin
44
  function bcn_admin()
45
  {
46
  //Setup our internal version
47
- $this->version = "3.0.0";
48
  //We'll let the fail fataly if the class isn't there as we depend on it
49
  $this->breadcrumb_trail = new bcn_breadcrumb_trail;
50
  //Installation Script hook
@@ -82,6 +82,8 @@ class bcn_admin
82
  {
83
  //Call our little security function
84
  $this->security();
 
 
85
  //Reduce db queries by saving this
86
  $db_version = $this->get_option('bcn_version');
87
  //If our version is not the same as in the db, time to update
@@ -89,103 +91,8 @@ class bcn_admin
89
  {
90
  //Split up the db version into it's components
91
  list($major, $minor, $release) = explode('.', $db_version);
92
- //For upgrading from 2.2.x betas
93
- if($major < 3 && $major > 1 && $minor > 1)
94
- {
95
- //Migrate over stuff
96
- $this->breadcrumb_trail->opt['home_display'] = str2bool(get_option('bcn_home_display'));
97
- $this->breadcrumb_trail->opt['home_title'] = get_option('bcn_home_title');
98
- $this->breadcrumb_trail->opt['home_anchor'] = get_option('bcn_home_anchor');
99
- $this->breadcrumb_trail->opt['blog_anchor'] = get_option('bcn_blog_anchor');
100
- $this->breadcrumb_trail->opt['separator'] = get_option('bcn_separator');
101
- $this->breadcrumb_trail->opt['max_title_length'] = get_option('bcn_max_title_length');
102
- $this->breadcrumb_trail->opt['current_item_linked'] = str2bool(get_option('bcn_current_item_linked'));
103
- $this->breadcrumb_trail->opt['current_item_anchor'] = get_option('bcn_current_item_anchor');
104
- $this->breadcrumb_trail->opt['current_item_prefix'] = get_option('bcn_current_item_prefix');
105
- $this->breadcrumb_trail->opt['current_item_suffix'] = get_option('bcn_current_item_suffix');
106
- $this->breadcrumb_trail->opt['paged_prefix'] = get_option('bcn_paged_prefix');
107
- $this->breadcrumb_trail->opt['paged_suffix'] = get_option('bcn_paged_suffix');
108
- $this->breadcrumb_trail->opt['paged_display'] = str2bool(get_option('bcn_paged_display'));
109
- $this->breadcrumb_trail->opt['page_prefix'] = get_option('bcn_page_prefix');
110
- $this->breadcrumb_trail->opt['page_suffix'] = get_option('bcn_page_suffix');
111
- $this->breadcrumb_trail->opt['page_anchor'] = get_option('bcn_page_anchor');
112
- $this->breadcrumb_trail->opt['post_prefix'] = get_option('bcn_post_prefix');
113
- $this->breadcrumb_trail->opt['post_suffix'] = get_option('bcn_post_suffix');
114
- $this->breadcrumb_trail->opt['post_anchor'] = get_option('bcn_post_anchor');
115
- $this->breadcrumb_trail->opt['post_taxonomy_display'] = str2bool(get_option('bcn_post_taxonomy_display'));
116
- $this->breadcrumb_trail->opt['post_taxonomy_type'] = get_option('bcn_post_taxonomy_type');
117
- $this->breadcrumb_trail->opt['attachment_prefix'] = get_option('bcn_attachment_prefix');
118
- $this->breadcrumb_trail->opt['attachment_suffix'] = get_option('bcn_attachment_suffix');
119
- $this->breadcrumb_trail->opt['404_prefix'] = get_option('bcn_404_prefix');
120
- $this->breadcrumb_trail->opt['404_suffix'] = get_option('bcn_404_suffix');
121
- $this->breadcrumb_trail->opt['404_title'] = get_option('bcn_404_title');
122
- $this->breadcrumb_trail->opt['search_prefix'] = get_option('bcn_search_prefix');
123
- $this->breadcrumb_trail->opt['search_suffix'] = get_option('bcn_search_suffix');
124
- $this->breadcrumb_trail->opt['tag_prefix'] = get_option('bcn_tag_prefix');
125
- $this->breadcrumb_trail->opt['tag_suffix'] = get_option('bcn_tag_suffix');
126
- $this->breadcrumb_trail->opt['tag_anchor'] = get_option('bcn_tag_anchor');
127
- $this->breadcrumb_trail->opt['author_prefix'] = get_option('bcn_author_prefix');
128
- $this->breadcrumb_trail->opt['author_suffix'] = get_option('bcn_author_suffix');
129
- $this->breadcrumb_trail->opt['author_display'] = get_option('bcn_author_display');
130
- $this->breadcrumb_trail->opt['category_prefix'] = get_option('bcn_category_prefix');
131
- $this->breadcrumb_trail->opt['category_suffix'] = get_option('bcn_category_suffix');
132
- $this->breadcrumb_trail->opt['category_anchor'] = get_option('bcn_category_anchor');
133
- $this->breadcrumb_trail->opt['archive_category_prefix'] = get_option('bcn_archive_category_prefix');
134
- $this->breadcrumb_trail->opt['archive_category_suffix'] = get_option('bcn_archive_category_suffix');
135
- $this->breadcrumb_trail->opt['archive_tag_prefix'] = get_option('bcn_archive_tag_prefix');
136
- $this->breadcrumb_trail->opt['archive_tag_suffix'] = get_option('bcn_archive_tag_suffix');
137
- $this->breadcrumb_trail->opt['date_anchor'] = get_option('bcn_date_anchor');
138
- $this->breadcrumb_trail->opt['archive_date_prefix'] = get_option('bcn_archive_date_prefix');
139
- $this->breadcrumb_trail->opt['archive_date_suffix'] = get_option('bcn_archive_date_suffix');
140
- //Now remove the old options
141
- delete_option('bcn_trail_linked');
142
- delete_option('bcn_home_display');
143
- delete_option('bcn_home_title');
144
- delete_option('bcn_home_anchor');
145
- delete_option('bcn_blog_anchor');
146
- delete_option('bcn_max_title_length');
147
- delete_option('bcn_separator');
148
- delete_option('bcn_search_prefix');
149
- delete_option('bcn_search_suffix');
150
- delete_option('bcn_author_prefix');
151
- delete_option('bcn_author_suffix');
152
- delete_option('bcn_author_display');
153
- delete_option('bcn_page_prefix');
154
- delete_option('bcn_page_suffix');
155
- delete_option('bcn_page_anchor');
156
- delete_option('bcn_archive_category_prefix');
157
- delete_option('bcn_archive_category_suffix');
158
- delete_option('bcn_archive_tag_prefix');
159
- delete_option('bcn_archive_tag_suffix');
160
- delete_option('bcn_attachment_prefix');
161
- delete_option('bcn_attachment_suffix');
162
- delete_option('bcn_404_prefix');
163
- delete_option('bcn_404_suffix');
164
- delete_option('bcn_404_title');
165
- delete_option('bcn_current_item_linked');
166
- delete_option('bcn_current_item_anchor');
167
- delete_option('bcn_current_item_prefix');
168
- delete_option('bcn_current_item_suffix');
169
- delete_option('bcn_paged_display');
170
- delete_option('bcn_paged_prefix');
171
- delete_option('bcn_paged_suffix');
172
- delete_option('bcn_post_prefix');
173
- delete_option('bcn_post_suffix');
174
- delete_option('bcn_post_taxonomy_type');
175
- delete_option('bcn_post_taxonomy_display');
176
- delete_option('bcn_post_anchor');
177
- delete_option('bcn_category_prefix');
178
- delete_option('bcn_category_suffix');
179
- delete_option('bcn_category_anchor');
180
- delete_option('bcn_tag_prefix');
181
- delete_option('bcn_tag_suffix');
182
- delete_option('bcn_tag_anchor');
183
- delete_option('bcn_archive_date_prefix');
184
- delete_option('bcn_archive_date_suffix');
185
- delete_option('bcn_date_anchor');
186
- }
187
- //For upgrading from 2.1.x
188
- if($major <= 2 && $minor <= 1 && $release <= 4)
189
  {
190
  //Upgrade to a current option
191
  $this->breadcrumb_trail->opt['home_title'] = get_option('bcn_title_blog');
@@ -1026,13 +933,13 @@ class bcn_admin
1026
  //We ignore anything but strings
1027
  if(is_string($item))
1028
  {
1029
- $db_data[$key] = htmlentities($item);
1030
  }
1031
  }
1032
  }
1033
  else
1034
  {
1035
- $db_data = htmlentities($db_data);
1036
  }
1037
  }
1038
  return $db_data;
3
  Plugin Name: Breadcrumb NavXT - Adminstration Interface
4
  Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
5
  Description: Adds a breadcrumb navigation showing the visitor&#39;s path to their current location. This enables the administrative interface for specifying the output of the breadcrumb trail. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
6
+ Version: 3.0.1
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
44
  function bcn_admin()
45
  {
46
  //Setup our internal version
47
+ $this->version = "3.0.1";
48
  //We'll let the fail fataly if the class isn't there as we depend on it
49
  $this->breadcrumb_trail = new bcn_breadcrumb_trail;
50
  //Installation Script hook
82
  {
83
  //Call our little security function
84
  $this->security();
85
+ //Initilize the options
86
+ $this->breadcrumb_trail = new bcn_breadcrumb_trail;
87
  //Reduce db queries by saving this
88
  $db_version = $this->get_option('bcn_version');
89
  //If our version is not the same as in the db, time to update
91
  {
92
  //Split up the db version into it's components
93
  list($major, $minor, $release) = explode('.', $db_version);
94
+ //For upgrading from 2.x.x
95
+ if($major < 3)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  {
97
  //Upgrade to a current option
98
  $this->breadcrumb_trail->opt['home_title'] = get_option('bcn_title_blog');
933
  //We ignore anything but strings
934
  if(is_string($item))
935
  {
936
+ $db_data[$key] = htmlentities($item, ENT_COMPAT, "UTF-8");
937
  }
938
  }
939
  }
940
  else
941
  {
942
+ $db_data = htmlentities($item, ENT_COMPAT, "UTF-8");
943
  }
944
  }
945
  return $db_data;
breadcrumb_navxt_api.php CHANGED
@@ -7,15 +7,6 @@
7
  * @author John Havlik
8
  * @author Tom Klingenberg
9
  *
10
- * 2008-03-06:
11
- * FIX: bcn_get - Reworked the conditions for when spaces
12
- * will be preserved.
13
- * 2008-02-07:
14
- * ADD: bcn_get_option_inputvalue - Escape Option Values to be used inside
15
- * (X)HTML Element Attribute Values.
16
- * FIX: bcn_get - fixed issue solved inside wordpress main
17
- * codebase in 2007-09.
18
- * see http://trac.wordpress.org/ticket/4781
19
  */
20
  /**
21
  * str2bool converts string of "true" to true and "false" to false
7
  * @author John Havlik
8
  * @author Tom Klingenberg
9
  *
 
 
 
 
 
 
 
 
 
10
  */
11
  /**
12
  * str2bool converts string of "true" to true and "false" to false
breadcrumb_navxt_class.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Breadcrumb NavXT - Core
4
  Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
5
  Description: Adds a breadcrumb navigation showing the visitor&#39;s path to their current location. This plug-in provides direct access to the bcn_breadcrumb_trail class without using the administrative interface. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
6
- Version: 3.0.0
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
@@ -86,7 +86,7 @@ class bcn_breadcrumb_trail
86
  //Default constructor
87
  function bcn_breadcrumb_trail()
88
  {
89
- $this->version = "3.0.0";
90
  //Initilize the trail as an array
91
  $this->trail = array();
92
  //Initilize with default option values
@@ -245,8 +245,10 @@ class bcn_breadcrumb_trail
245
  //We need to treat post and page attachment hierachy differently
246
  if($bcn_parent->post_type == "page")
247
  {
 
 
248
  //Place the rest of the page hierachy
249
- $this->page_parents($bcn_parent_id);
250
  }
251
  else
252
  {
@@ -648,15 +650,17 @@ class bcn_breadcrumb_trail
648
  global $post;
649
  if(get_option('show_on_front') == "page")
650
  {
 
 
651
  //We only need the "blog" portion on members of the blog, not searches, pages or 404s
652
- if(is_single() || is_archive() || is_author() || is_home())
653
  {
654
  //Add new breadcrumb to the trail
655
  $this->trail[] = new bcn_breadcrumb();
656
  //Figure out where we placed the crumb, make a nice pointer to it
657
  $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
658
  //Get the blog page ID
659
- $post = get_post(get_option("page_for_posts"));
660
  //Setup the title
661
  $bcn_breadcrumb->title = apply_filters("the_title", $post->post_title);
662
  if(is_home())
@@ -685,7 +689,7 @@ class bcn_breadcrumb_trail
685
  $this->page_parents($post->post_parent, $bcn_frontpage);
686
  }
687
  }
688
- //Sometimes we don't have a home breadcrumb in the trail
689
  if($this->opt['home_display'])
690
  {
691
  //Add new breadcrumb to the trail
3
  Plugin Name: Breadcrumb NavXT - Core
4
  Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
5
  Description: Adds a breadcrumb navigation showing the visitor&#39;s path to their current location. This plug-in provides direct access to the bcn_breadcrumb_trail class without using the administrative interface. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
6
+ Version: 3.0.1
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
86
  //Default constructor
87
  function bcn_breadcrumb_trail()
88
  {
89
+ $this->version = "3.0.1";
90
  //Initilize the trail as an array
91
  $this->trail = array();
92
  //Initilize with default option values
245
  //We need to treat post and page attachment hierachy differently
246
  if($bcn_parent->post_type == "page")
247
  {
248
+ //Grab the page on front ID for page_parents
249
+ $bcn_frontpage = get_option('page_on_front');
250
  //Place the rest of the page hierachy
251
+ $this->page_parents($bcn_parent_id, $bcn_frontpage);
252
  }
253
  else
254
  {
650
  global $post;
651
  if(get_option('show_on_front') == "page")
652
  {
653
+ //We'll have to check if this ID is valid, e.g. user has specified a posts page
654
+ $posts_id = get_option("page_for_posts");
655
  //We only need the "blog" portion on members of the blog, not searches, pages or 404s
656
+ if((is_single() || is_archive() || is_author() || is_home()) && $posts_id != NULL)
657
  {
658
  //Add new breadcrumb to the trail
659
  $this->trail[] = new bcn_breadcrumb();
660
  //Figure out where we placed the crumb, make a nice pointer to it
661
  $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
662
  //Get the blog page ID
663
+ $post = get_post($posts_id);
664
  //Setup the title
665
  $bcn_breadcrumb->title = apply_filters("the_title", $post->post_title);
666
  if(is_home())
689
  $this->page_parents($post->post_parent, $bcn_frontpage);
690
  }
691
  }
692
+ //Sometimes we don't have a blog breadcrumb in the trail
693
  if($this->opt['home_display'])
694
  {
695
  //Add new breadcrumb to the trail
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: mtekk, hakre
3
  Tags: breadcrumb, navigation
4
  Requires at least: 2.5.0
5
- Tested up to: 2.7-hemorrhage
6
- Stable tag: 3.0.0
7
 
8
  Adds breadcrumb navigation showing the visitor's path to their current location.
9
 
@@ -13,4 +13,4 @@ Breadcrumb NavXT, the successor to the popular WordPress plugin Breadcrumb Navig
13
 
14
  == Installation ==
15
 
16
- Please visit [Breadcrumb NavXT's](http://mtekk.weblogs.us/code/breadcrumb-navxt/ "Go to Breadcrumb NavXT's project page") project page for intallation and usage instructions.
2
  Contributors: mtekk, hakre
3
  Tags: breadcrumb, navigation
4
  Requires at least: 2.5.0
5
+ Tested up to: 2.7-almost-beta
6
+ Stable tag: 3.0.1
7
 
8
  Adds breadcrumb navigation showing the visitor's path to their current location.
9
 
13
 
14
  == Installation ==
15
 
16
+ Please visit [Breadcrumb NavXT's](http://mtekk.weblogs.us/code/breadcrumb-navxt/#installation "Go to Breadcrumb NavXT's project page's installation section.") project page for intallation and usage instructions.
tabulator_navxt.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Tabulator (Breadcrumb NavXT Extending) [PHP5]
13
  * Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt
14
  * Description: And Tabs should come over all your admin pages as WP 2.5 will let you rule the world of jQuery and beyond! Thou shall it be!
15
- * Version: 3.0.0
16
  * Author: Tom Klingenberg/John Havlik
17
  * Author URI: http://mtekk.weblogs.us
18
  */
12
  * Plugin Name: Tabulator (Breadcrumb NavXT Extending) [PHP5]
13
  * Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt
14
  * Description: And Tabs should come over all your admin pages as WP 2.5 will let you rule the world of jQuery and beyond! Thou shall it be!
15
+ * Version: 3.0.1
16
  * Author: Tom Klingenberg/John Havlik
17
  * Author URI: http://mtekk.weblogs.us
18
  */