Yoast Breadcrumbs - Version 0.6.2

Version Description

Download this release

Release Info

Developer joostdevalk
Plugin Icon wp plugin Yoast Breadcrumbs
Version 0.6.2
Comparing to
See all releases

Code changes from version 0.6.1 to 0.6.2

Files changed (2) hide show
  1. readme.txt +1 -1
  2. yoast-breadcrumbs.php +10 -2
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://yoast.com/donate/
4
  Tags: rss, footer
5
  Requires at least: 2.2
6
  Tested up to: 2.6
7
- stable tag: 0.6.1
8
 
9
  Easily add breadcrumbs to your template!
10
 
4
  Tags: rss, footer
5
  Requires at least: 2.2
6
  Tested up to: 2.6
7
+ stable tag: 0.6.2
8
 
9
  Easily add breadcrumbs to your template!
10
 
yoast-breadcrumbs.php CHANGED
@@ -2,7 +2,7 @@
2
  Plugin Name: Yoast Breadcrumbs
3
  Plugin URI: http://yoast.com/wordpress/breadcrumbs/
4
  Description: Outputs a fully customizable breadcrumb path.
5
- Version: 0.6.1
6
  Author: Joost de Valk
7
  Author URI: http://yoast.com/
8
 
@@ -188,7 +188,15 @@ function yoast_breadcrumb($prefix = '', $suffix = '', $display = true) {
188
  if ( 0 == $post->post_parent ) {
189
  $output = $homelink." ".$opt['sep']." ".bold_or_not(get_the_title());
190
  } else {
191
- $ancestors = array_values($post->ancestors);
 
 
 
 
 
 
 
 
192
  // Reverse the order so it's oldest to newest
193
  $ancestors = array_reverse($ancestors);
194
 
2
  Plugin Name: Yoast Breadcrumbs
3
  Plugin URI: http://yoast.com/wordpress/breadcrumbs/
4
  Description: Outputs a fully customizable breadcrumb path.
5
+ Version: 0.6.2
6
  Author: Joost de Valk
7
  Author URI: http://yoast.com/
8
 
188
  if ( 0 == $post->post_parent ) {
189
  $output = $homelink." ".$opt['sep']." ".bold_or_not(get_the_title());
190
  } else {
191
+ if (isset($post->ancestors)) {
192
+ if (is_array($post->ancestors))
193
+ $ancestors = array_values($post->ancestors);
194
+ else
195
+ $ancestors = array($post->ancestors);
196
+ } else {
197
+ $ancestors = array($post->post_parent);
198
+ }
199
+
200
  // Reverse the order so it's oldest to newest
201
  $ancestors = array_reverse($ancestors);
202