Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Added filters to gives possibility to specify which term to use to gener... #758

merged 1 commit into from

3 participants


...ate permalink/breadcrumb for product

Optart's customer wanted to have the category in breadcrumb, which user used to show the product. Right now if product is in many categories the "first" one is taken and used to generate breadcrumb and permalink for product. My plugin puts to permalink the category in which user is currently, then the breadcrumb is dispalyed on basis of that category.


@chriscct7 -- same for this one Chris, the commit itself is fine and I'm going to ignore the failed build notice and merge it in.

Is it just something with Travis that for some reason it's taking to long to execute the tests?

Why would the PHP 5.3 test fail and the PHP 5.4 test pass for multisite? (or so it appears?)

@divergeinfinity divergeinfinity merged commit 5192c3a into jigoshop:dev

1 check failed

Details default The Travis build failed

@divergeinfinity Sometimes the merge of dependencies fails. I'm working on an optomized script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 21, 2012
  1. @annzaan

    Added filters to gives possibility to specify which term to use to ge…

    annzaan authored
    …nerate permalin/breadcrumb for product
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +1 −1  jigoshop.php
  2. +1 −1  jigoshop_template_functions.php
2  jigoshop.php
@@ -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 );
2  jigoshop_template_functions.php
@@ -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):
Something went wrong with that request. Please try again.