@@ 230-234 (lines=5) @@ | ||
227 | $count = isset( $term_counts[ $term->term_id ] ) ? $term_counts[ $term->term_id ] : 0; |
|
228 | ||
229 | // Only show options with count > 0 |
|
230 | if ( 0 < $count ) { |
|
231 | $found = true; |
|
232 | } elseif ( 'and' === $query_type && 0 === $count && ! $option_is_set ) { |
|
233 | continue; |
|
234 | } |
|
235 | ||
236 | echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( $option_is_set, true, false ) . '>' . esc_html( $term->name ) . '</option>'; |
|
237 | } |
|
@@ 383-387 (lines=5) @@ | ||
380 | } |
|
381 | ||
382 | // Only show options with count > 0 |
|
383 | if ( 0 < $count ) { |
|
384 | $found = true; |
|
385 | } elseif ( 'and' === $query_type && 0 === $count && ! $option_is_set ) { |
|
386 | continue; |
|
387 | } |
|
388 | ||
389 | $filter_name = 'filter_' . sanitize_title( str_replace( 'pa_', '', $taxonomy ) ); |
|
390 | $current_filter = isset( $_GET[ $filter_name ] ) ? explode( ',', wc_clean( $_GET[ $filter_name ] ) ) : array(); |