| @@ -231,18 +231,13 @@ | ||
| 231 | 231 | |
| 232 | 232 | // Terms per post |
| 233 | 233 | $post_taxonomy_term_ids[] = $slug; |
| 234 | 234 | |
| 235 | - if( !array_key_exists( $slug, $filter_terms ) ) { | |
| 236 | - // Filter terms | |
| 237 | - $filter_terms[$slug] = array( | |
| 238 | - 'taxonomy' => $taxonomy, | |
| 239 | - 'name' => $term->name, | |
| 240 | - 'count' => 1, | |
| 241 | - ); | |
| 242 | - } else { | |
| 243 | - $filter_terms[$slug]['count']++; | |
| 244 | - } | |
| 235 | + // Filter terms | |
| 236 | + $filter_terms[$slug] = array( | |
| 237 | + 'taxonomy' => $taxonomy, | |
| 238 | + 'name' => $term->name, | |
| 239 | + ); | |
| 245 | 240 | } |
| 246 | 241 | |
| 247 | 242 | $terms_per_post[$post_id][$taxonomy] = $post_taxonomy_term_ids; |
| 248 | 243 | } |
| @@ -269,15 +264,9 @@ | ||
| 269 | 264 | foreach( $filter_terms_order as $slug ) { |
| 270 | 265 | $options = isset( $filter_terms[$slug] ) ? $filter_terms[$slug] : false; |
| 271 | 266 | |
| 272 | 267 | if( $options ) { |
| 273 | - if( $grid->filter_count() ) { | |
| 274 | - $name = $options['name'] . ' (' . $options['count'] . ')'; | |
| 275 | - } else { | |
| 276 | - $name = $options['name']; | |
| 277 | - } | |
| 278 | - | |
| 279 | - $filter .= '<div class="wpupg-filter-item wpupg-filter-isotope-term wpupg-filter-tag-' . $slug . '" data-taxonomy="' . $options['taxonomy'] . '" data-filter="' . $slug . '">' . $name . '</div>'; | |
| 268 | + $filter .= '<div class="wpupg-filter-item wpupg-filter-isotope-term wpupg-filter-tag-' . $slug . '" data-taxonomy="' . $options['taxonomy'] . '" data-filter="' . $slug . '">' . $options['name'] . '</div>'; | |
| 280 | 269 | } |
| 281 | 270 | } |
| 282 | 271 | } |
| 283 | 272 | |