| @@ -219,9 +219,9 @@ | ||
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | public function content( $attr, $noAjax ) { |
| 222 | 222 | $attr = wp_parse_args( $attr, $this->get_attributes() ); |
| 223 | - global $unique_ID; | |
| 223 | + global $ultp_unique_ID; | |
| 224 | 224 | |
| 225 | 225 | if ( ! $noAjax ) { |
| 226 | 226 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 227 | 227 | $attr['paged'] = $paged ? $paged : 1; |
| @@ -226,9 +226,9 @@ | ||
| 226 | 226 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 227 | 227 | $attr['paged'] = $paged ? $paged : 1; |
| 228 | 228 | } |
| 229 | 229 | if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) { |
| 230 | - $unique_ID = $attr['savedQueryUnique']; | |
| 230 | + $ultp_unique_ID = $attr['savedQueryUnique']; | |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | $block_name = 'post-list-3'; |
| 234 | 234 | $wraper_before = $wraper_after = $post_loop = ''; |
| @@ -239,9 +239,9 @@ | ||
| 239 | 239 | $dummy_url = ULTP_URL . 'assets/img/ultp-fallback-img.png'; |
| 240 | 240 | |
| 241 | 241 | // Loadmore and Unique content |
| 242 | 242 | if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) { |
| 243 | - $unique_ID = $attr['loadMoreQueryUnique']; | |
| 243 | + $ultp_unique_ID = $attr['loadMoreQueryUnique']; | |
| 244 | 244 | $current_unique_posts = $attr['ultp_current_unique_posts']; |
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : ''; |
| @@ -315,9 +315,9 @@ | ||
| 315 | 315 | |
| 316 | 316 | include ULTP_PATH . 'blocks/template/category.php'; |
| 317 | 317 | |
| 318 | 318 | if ( $attr['queryUnique'] ) { |
| 319 | - $unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 319 | + $ultp_unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 320 | 320 | $current_unique_posts[] = $post_id; |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | $post_loop .= '<' . $attr['contentTag'] . ' class="ultp-block-item ultp-block-media post-id-' . $post_id . '">'; |
| @@ -410,9 +410,9 @@ | ||
| 410 | 410 | $post_loop .= '</' . $attr['contentTag'] . '>'; |
| 411 | 411 | ++$idx; |
| 412 | 412 | endwhile; |
| 413 | 413 | if ( $attr['queryUnique'] ) { |
| 414 | - $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>'; | |
| 414 | + $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>'; | |
| 415 | 415 | } |
| 416 | 416 | // if ( ($attr['paginationShow'] || $attr['advPaginationEnable'] ) && ($attr['paginationType'] == 'loadMore')) { |
| 417 | 417 | // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>'; |
| 418 | 418 | // } |
| @@ -437,9 +437,9 @@ | ||
| 437 | 437 | $wraper_after .= '</div>'; |
| 438 | 438 | $wraper_after .= $pagi_block_html; |
| 439 | 439 | $wraper_after .= '</div>'; |
| 440 | 440 | |
| 441 | - wp_reset_query(); | |
| 441 | + wp_reset_postdata(); | |
| 442 | 442 | } else { |
| 443 | 443 | $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] ); |
| 444 | 444 | } |
| 445 | 445 | |