Permalink
Browse files

Merge pull request #758 from annzaan/breadcrumb_filters

Added filters to gives possibility to specify which term to use to gener...
  • Loading branch information...
2 parents 40f7307 + c7efa09 commit 5192c3a6f79b88b28371f205a17b1e7bdba99b85 Jeff Parsons committed Dec 24, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 jigoshop.php
  2. +1 −1 jigoshop_template_functions.php
View
@@ -564,7 +564,7 @@ function jigoshop_product_cat_filter_post_link( $permalink, $post, $leavename, $
$permalink = str_replace( '%product_cat%', _x('product', 'slug', 'jigoshop'), $permalink );
else :
// Replace the placeholder rewrite tag with the first term's slug
- $first_term = array_shift( $terms );
+ $first_term = apply_filters( 'jigoshop_product_cat_permalink_terms', array_shift( $terms ), $terms);
$permalink = str_replace( '%product_cat%', $first_term->slug, $permalink );
endif;
@@ -996,7 +996,7 @@ function jigoshop_breadcrumb( $delimiter = ' &rsaquo; ', $wrap_before = '<div id
echo $prepend;
if ($terms = get_the_terms( $post->ID, 'product_cat' )) :
- $term = current($terms);
+ $term = apply_filters( 'jigoshop_product_cat_breadcrumb_terms', current($terms), $terms);
$parents = array();
$parent = $term->parent;
while ($parent):

0 comments on commit 5192c3a

Please sign in to comment.