| @@ -233,9 +233,9 @@ | ||
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | public function content( $attr, $noAjax ) { |
| 236 | 236 | $attr = wp_parse_args( $attr, $this->get_attributes() ); |
| 237 | - global $unique_ID; | |
| 237 | + global $ultp_unique_ID; | |
| 238 | 238 | |
| 239 | 239 | if ( ! $noAjax ) { |
| 240 | 240 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 241 | 241 | $attr['paged'] = $paged ? $paged : 1; |
| @@ -240,9 +240,9 @@ | ||
| 240 | 240 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 241 | 241 | $attr['paged'] = $paged ? $paged : 1; |
| 242 | 242 | } |
| 243 | 243 | if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) { |
| 244 | - $unique_ID = $attr['savedQueryUnique']; | |
| 244 | + $ultp_unique_ID = $attr['savedQueryUnique']; | |
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | $block_name = 'post-list-4'; |
| 248 | 248 | $vid_icon_redirect = true; // Its used for video icon do not remove it |
| @@ -254,9 +254,9 @@ | ||
| 254 | 254 | $dummy_url = ULTP_URL . 'assets/img/ultp-fallback-img.png'; |
| 255 | 255 | |
| 256 | 256 | // Loadmore and Unique content |
| 257 | 257 | if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) { |
| 258 | - $unique_ID = $attr['loadMoreQueryUnique']; | |
| 258 | + $ultp_unique_ID = $attr['loadMoreQueryUnique']; | |
| 259 | 259 | $current_unique_posts = $attr['ultp_current_unique_posts']; |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : ''; |
| @@ -330,9 +330,9 @@ | ||
| 330 | 330 | |
| 331 | 331 | include ULTP_PATH . 'blocks/template/category.php'; |
| 332 | 332 | |
| 333 | 333 | if ( $attr['queryUnique'] ) { |
| 334 | - $unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 334 | + $ultp_unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 335 | 335 | $current_unique_posts[] = $post_id; |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | $post_loop .= '<' . $attr['contentTag'] . ' class="ultp-block-item ultp-block-media post-id-' . $post_id . '">'; |
| @@ -448,9 +448,9 @@ | ||
| 448 | 448 | $post_loop .= '</' . $attr['contentTag'] . '>'; |
| 449 | 449 | ++$idx; |
| 450 | 450 | endwhile; |
| 451 | 451 | if ( $attr['queryUnique'] ) { |
| 452 | - $post_loop .= "<span style='display: none;' class='ultp-current-unique-posts' data-ultp-unique-ids= " . wp_json_encode( $unique_ID ) . ' data-current-unique-posts= ' . wp_json_encode( $current_unique_posts ) . '> </span>'; | |
| 452 | + $post_loop .= "<span style='display: none;' class='ultp-current-unique-posts' data-ultp-unique-ids= " . wp_json_encode( $ultp_unique_ID ) . ' data-current-unique-posts= ' . wp_json_encode( $current_unique_posts ) . '> </span>'; | |
| 453 | 453 | } |
| 454 | 454 | // if ( ( $attr['paginationShow'] || $attr['advPaginationEnable'] ) && ($attr['paginationType'] == 'loadMore')) { |
| 455 | 455 | // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>'; |
| 456 | 456 | // } |
| @@ -475,9 +475,9 @@ | ||
| 475 | 475 | $wraper_after .= '</div>'; |
| 476 | 476 | $wraper_after .= $pagi_block_html; |
| 477 | 477 | $wraper_after .= '</div>'; |
| 478 | 478 | |
| 479 | - wp_reset_query(); | |
| 479 | + wp_reset_postdata(); | |
| 480 | 480 | } else { |
| 481 | 481 | $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] ); |
| 482 | 482 | } |
| 483 | 483 | |