cat-parent without extra query. Closes #3355.

This commit is contained in:
Mike Jolley 2013-06-28 10:07:18 +01:00
parent f8f3f8a660
commit 9f5f81c1aa
2 changed files with 4 additions and 1 deletions

View File

@ -64,6 +64,9 @@ class WC_Product_Cat_List_Walker extends Walker {
if ( $args['current_category'] == $cat->term_id )
$output .= ' current-cat';
if ( $args['has_children'] && $args['hierarchical'] )
$output .= ' cat-parent';
if ( $args['current_category_ancestors'] && $args['current_category'] && in_array( $cat->term_id, $args['current_category_ancestors'] ) )
$output .= ' current-cat-parent';

View File

@ -27,7 +27,7 @@ class WC_Widget_Product_Categories extends WC_Widget {
$this->settings = array(
'title' => array(
'type' => 'text',
'std' => __( 'Top Rated Products', 'woocommerce' ),
'std' => __( 'Product Categories', 'woocommerce' ),
'label' => __( 'Title', 'woocommerce' )
),
'orderby' => array(