is_product_category and is_product_tag support term argument

This commit is contained in:
Mike Jolley 2012-04-20 18:36:26 +01:00
parent 6ba275b0ef
commit d4133af4e6
2 changed files with 5 additions and 4 deletions

View File

@ -146,6 +146,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
= 1.5.5 =
* Feature - is_sold_individually() function for disabling quantity inputs for products
* Tweak - Cart.php display with more filters
* Tweak - is_product_category and is_product_tag support term argument
* Tweak - Added minus symbol before discount on view order page
* Tweak - Added yards as dimensions unit
* Tweak - Allow more readable flat rate options to be entered

View File

@ -200,13 +200,13 @@ if (!function_exists('is_shop')) {
}
}
if (!function_exists('is_product_category')) {
function is_product_category() {
return is_tax( 'product_cat' );
function is_product_category( $term = '' ) {
return is_tax( 'product_cat', $term );
}
}
if (!function_exists('is_product_tag')) {
function is_product_tag() {
return is_tax( 'product_tag' );
function is_product_tag( $term = '' ) {
return is_tax( 'product_tag', $term );
}
}
if (!function_exists('is_product')) {