Breadcrumb Trail - Version 0.2

Version Description

Download this release

Release Info

Developer greenshady
Plugin Icon 128x128 Breadcrumb Trail
Version 0.2
Comparing to
See all releases

Code changes from version 0.2.1 to 0.2

Files changed (2) hide show
  1. breadcrumb-trail.php +10 -10
  2. readme.txt +1 -5
breadcrumb-trail.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Breadcrumb Trail
4
  * Plugin URI: http://justintadlock.com/archives/2009/04/05/breadcrumb-trail-wordpress-plugin
5
  * Description: A WordPress plugin that gives you the <code>breadcrumb_trail()</code> template tag to use anywhere in your theme to show a breadcrumb menu.
6
- * Version: 0.2.1
7
  * Author: Justin Tadlock
8
  * Author URI: http://justintadlock.com
9
  *
@@ -12,8 +12,8 @@
12
  * Two filter hooks are available for developers to change the
13
  * output: breadcrumb_trail_args and breadcrumb_trail.
14
  *
15
- * @copyright 2008 - 2010
16
- * @version 0.2.1
17
  * @author Justin Tadlock
18
  * @link http://justintadlock.com/archives/2009/04/05/breadcrumb-trail-wordpress-plugin
19
  * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
@@ -129,12 +129,12 @@ function breadcrumb_trail( $args = array() ) {
129
  $term = $wp_query->get_queried_object();
130
 
131
  if ( is_category() && $term->parent ) {
132
- $parents = get_category_parents( $term->parent, true, " {$separator} ", false );
133
  if ( $parents )
134
- $trail['trail_end'] = $parents;
135
  }
136
 
137
- $trail['trail_end'] .= $term->name;
138
  }
139
 
140
  elseif ( is_author() )
@@ -155,18 +155,18 @@ function breadcrumb_trail( $args = array() ) {
155
  elseif ( is_date() ) {
156
 
157
  if ( is_day() ) {
158
- $trail[] = '<a href="' . get_year_link( get_the_time( __( 'Y', $textdomain ) ) ) . '" title="' . get_the_time( __( 'Y', $textdomain ) ) . '">' . get_the_time( __( 'Y', $textdomain ) ) . '</a>';
159
- $trail[] = '<a href="' . get_month_link( get_the_time( __( 'Y', $textdomain ) ), get_the_time( __( 'm', $textdomain ) ) ) . '" title="' . get_the_time( __( 'F', $textdomain ) ) . '">' . get_the_time( __( 'F', $textdomain ) ) . '</a>';
160
  $trail['trail_end'] = get_the_time( __( 'j', $textdomain ) );
161
  }
162
 
163
  elseif ( get_query_var( 'w' ) ) {
164
- $trail[] = '<a href="' . get_year_link( get_the_time( __( 'Y', $textdomain ) ) ) . '" title="' . get_the_time( __( 'Y', $textdomain ) ) . '">' . get_the_time( __( 'Y', $textdomain ) ) . '</a>';
165
  $trail['trail_end'] = sprintf( __( 'Week %1$s', 'hybrid' ), get_the_time( __( 'W', $textdomain ) ) );
166
  }
167
 
168
  elseif ( is_month() ) {
169
- $trail[] = '<a href="' . get_year_link( get_the_time( __( 'Y', $textdomain ) ) ) . '" title="' . get_the_time( __( 'Y', $textdomain ) ) . '">' . get_the_time( __( 'Y', $textdomain ) ) . '</a>';
170
  $trail['trail_end'] = get_the_time( __( 'F', $textdomain ) );
171
  }
172
 
3
  * Plugin Name: Breadcrumb Trail
4
  * Plugin URI: http://justintadlock.com/archives/2009/04/05/breadcrumb-trail-wordpress-plugin
5
  * Description: A WordPress plugin that gives you the <code>breadcrumb_trail()</code> template tag to use anywhere in your theme to show a breadcrumb menu.
6
+ * Version: 0.2
7
  * Author: Justin Tadlock
8
  * Author URI: http://justintadlock.com
9
  *
12
  * Two filter hooks are available for developers to change the
13
  * output: breadcrumb_trail_args and breadcrumb_trail.
14
  *
15
+ * @copyright 2008 - 2009
16
+ * @version 0.2
17
  * @author Justin Tadlock
18
  * @link http://justintadlock.com/archives/2009/04/05/breadcrumb-trail-wordpress-plugin
19
  * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
129
  $term = $wp_query->get_queried_object();
130
 
131
  if ( is_category() && $term->parent ) {
132
+ $parents = get_category_parents( $term->parent, true, $separator, false );
133
  if ( $parents )
134
+ $trail[] = $parents;
135
  }
136
 
137
+ $trail['trail_end'] = $term->name;
138
  }
139
 
140
  elseif ( is_author() )
155
  elseif ( is_date() ) {
156
 
157
  if ( is_day() ) {
158
+ $trail[] = '<a href="' . get_year_link( get_the_time( __( 'Y', $textdomain ) ) ) . '" title="' . get_the_time( __( 'Y', $textdomain ) ) . '">' . get_the_time( __( 'Y', $textdomain ) ) . '</a>' . $separator;
159
+ $trail[] = '<a href="' . get_month_link( get_the_time( __( 'Y', $textdomain ) ), get_the_time( __( 'm', $textdomain ) ) ) . '" title="' . get_the_time( __( 'F', $textdomain ) ) . '">' . get_the_time( __( 'F', $textdomain ) ) . '</a>' . $separator;
160
  $trail['trail_end'] = get_the_time( __( 'j', $textdomain ) );
161
  }
162
 
163
  elseif ( get_query_var( 'w' ) ) {
164
+ $trail[] = '<a href="' . get_year_link( get_the_time( __( 'Y', $textdomain ) ) ) . '" title="' . get_the_time( __( 'Y', $textdomain ) ) . '">' . get_the_time( __( 'Y', $textdomain ) ) . '</a>' . $separator;
165
  $trail['trail_end'] = sprintf( __( 'Week %1$s', 'hybrid' ), get_the_time( __( 'W', $textdomain ) ) );
166
  }
167
 
168
  elseif ( is_month() ) {
169
+ $trail[] = '<a href="' . get_year_link( get_the_time( __( 'Y', $textdomain ) ) ) . '" title="' . get_the_time( __( 'Y', $textdomain ) ) . '">' . get_the_time( __( 'Y', $textdomain ) ) . '</a>' . $separator;
170
  $trail['trail_end'] = get_the_time( __( 'F', $textdomain ) );
171
  }
172
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: navigation, menu
5
  Requires at least: 2.8
6
  Tested up to: 2.9
7
- Stable tag: 0.2.1
8
 
9
  An easy-to-use template tag for showing a breadcrumb menu on your site.
10
 
@@ -56,10 +56,6 @@ There are no screenshots for this plugin.
56
 
57
  == Changelog ==
58
 
59
- ** Version 0.2.1 **
60
-
61
- * Removed and/or added (depending on the case) the extra separator item on sub-categories and date-/time-based breadcrumbs.
62
-
63
  ** Version 0.2 **
64
 
65
  * The title of the "home" page (i.e. posts page) when not the front page is now properly recognized.
4
  Tags: navigation, menu
5
  Requires at least: 2.8
6
  Tested up to: 2.9
7
+ Stable tag: 0.2
8
 
9
  An easy-to-use template tag for showing a breadcrumb menu on your site.
10
 
56
 
57
  == Changelog ==
58
 
 
 
 
 
59
  ** Version 0.2 **
60
 
61
  * The title of the "home" page (i.e. posts page) when not the front page is now properly recognized.