| @@ -39,16 +39,21 @@ | ||
| 39 | 39 | |
| 40 | 40 | $query = new WP_Query( $args ); |
| 41 | 41 | $posts = $query->have_posts() ? $query->posts : array(); |
| 42 | 42 | |
| 43 | + $grid_ids = array(); | |
| 43 | 44 | foreach ( $posts as $grid_post ) |
| 44 | 45 | { |
| 45 | 46 | $grid = new WPUPG_Grid( $grid_post ); |
| 46 | 47 | |
| 47 | 48 | if( in_array( $post_type, $grid->post_types() ) ) { |
| 48 | - $this->generate( $grid->ID() ); | |
| 49 | + $grid_ids[] = $grid->ID(); | |
| 49 | 50 | } |
| 50 | 51 | } |
| 52 | + | |
| 53 | + if( count( $grid_ids ) > 0 ) { | |
| 54 | + update_option( 'wpupg_regenerate_grids_check', $grid_ids ); | |
| 55 | + } | |
| 51 | 56 | } |
| 52 | 57 | |
| 53 | 58 | public function updated_term( $term_id, $taxonomy ) |
| 54 | 59 | { |
| @@ -334,14 +339,14 @@ | ||
| 334 | 339 | } else { |
| 335 | 340 | $name = $options['name']; |
| 336 | 341 | } |
| 337 | 342 | |
| 338 | - $filter .= '<div class="wpupg-filter-item wpupg-filter-isotope-term wpupg-filter-tag-' . $slug . '" data-taxonomy="' . $options['taxonomy'] . '" data-filter="' . $slug . '">' . $name . '</div>'; | |
| 343 | + $filter .= '<div class="wpupg-filter-item wpupg-filter-isotope-term wpupg-filter-isotope-term-' . $options['taxonomy'] . ' wpupg-filter-tag-' . $slug . '" data-taxonomy="' . $options['taxonomy'] . '" data-filter="' . $slug . '">' . $name . '</div>'; | |
| 339 | 344 | } |
| 340 | 345 | } |
| 341 | 346 | |
| 342 | 347 | if( $grid->filter_type() == 'text_isotope' && WPUltimatePostGrid::is_addon_active('filter-text') ) { |
| 343 | - $filter .= WPUltimatePostGrid::addon('filter-text')->get_filter(); | |
| 348 | + $filter .= WPUltimatePostGrid::addon('filter-text')->get_filter( $grid ); | |
| 344 | 349 | } |
| 345 | 350 | } |
| 346 | 351 | |
| 347 | 352 | // Update Metadata |