| @@ -236,9 +236,9 @@ | ||
| 236 | 236 | |
| 237 | 237 | public function content( $attr, $noAjax ) { |
| 238 | 238 | $attr = wp_parse_args( $attr, $this->get_attributes() ); |
| 239 | 239 | $attr['queryUnique'] = isset( $attr['queryUnique'] ) ? $attr['queryUnique'] : ''; |
| 240 | - global $unique_ID; | |
| 240 | + global $ultp_unique_ID; | |
| 241 | 241 | |
| 242 | 242 | if ( ! $noAjax ) { |
| 243 | 243 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 244 | 244 | $attr['paged'] = $paged ? $paged : 1; |
| @@ -243,9 +243,9 @@ | ||
| 243 | 243 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 244 | 244 | $attr['paged'] = $paged ? $paged : 1; |
| 245 | 245 | } |
| 246 | 246 | if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) { |
| 247 | - $unique_ID = $attr['savedQueryUnique']; | |
| 247 | + $ultp_unique_ID = $attr['savedQueryUnique']; | |
| 248 | 248 | } |
| 249 | 249 | $block_name = 'post-list-1'; |
| 250 | 250 | $wraper_before = $wraper_after = $post_loop = ''; |
| 251 | 251 | $attr['queryNumber'] = ultimate_post()->get_post_number( 6, $attr['queryNumber'], $attr['queryNumPosts'] ); |
| @@ -260,9 +260,9 @@ | ||
| 260 | 260 | $curr_post_id = get_the_ID(); |
| 261 | 261 | } |
| 262 | 262 | // Loadmore and Unique content |
| 263 | 263 | if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) { |
| 264 | - $unique_ID = $attr['loadMoreQueryUnique']; | |
| 264 | + $ultp_unique_ID = $attr['loadMoreQueryUnique']; | |
| 265 | 265 | $current_unique_posts = $attr['ultp_current_unique_posts']; |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : ''; |
| @@ -334,9 +334,9 @@ | ||
| 334 | 334 | |
| 335 | 335 | include ULTP_PATH . 'blocks/template/category.php'; |
| 336 | 336 | |
| 337 | 337 | if ( $attr['queryUnique'] ) { |
| 338 | - $unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 338 | + $ultp_unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 339 | 339 | $current_unique_posts[] = $post_id; |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | $post_loop .= '<' . $attr['contentTag'] . ' class="ultp-block-item post-id-' . $post_id . '">'; |
| @@ -469,9 +469,9 @@ | ||
| 469 | 469 | ++$idx; |
| 470 | 470 | ++$index; |
| 471 | 471 | endwhile; |
| 472 | 472 | if ( $attr['queryUnique'] ) { |
| 473 | - $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>'; | |
| 473 | + $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>'; | |
| 474 | 474 | } |
| 475 | 475 | // if ( ($attr['paginationShow'] || $attr['advPaginationEnable'] ) && ($attr['paginationType'] == 'loadMore')) { |
| 476 | 476 | // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>'; |
| 477 | 477 | // } |
| @@ -495,9 +495,9 @@ | ||
| 495 | 495 | $wraper_after .= '</div>'; |
| 496 | 496 | $wraper_after .= $pagi_block_html; |
| 497 | 497 | $wraper_after .= '</div>'; |
| 498 | 498 | |
| 499 | - wp_reset_query(); | |
| 499 | + wp_reset_postdata(); | |
| 500 | 500 | } else { |
| 501 | 501 | $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] ); |
| 502 | 502 | } |
| 503 | 503 | |