| @@ -210,9 +210,9 @@ | ||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | public function content( $attr, $noAjax ) { |
| 213 | 213 | $attr = wp_parse_args( $attr, $this->get_attributes() ); |
| 214 | - global $unique_ID; | |
| 214 | + global $ultp_unique_ID; | |
| 215 | 215 | |
| 216 | 216 | if ( ! $noAjax ) { |
| 217 | 217 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 218 | 218 | $attr['paged'] = $paged ? $paged : 1; |
| @@ -217,9 +217,9 @@ | ||
| 217 | 217 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 218 | 218 | $attr['paged'] = $paged ? $paged : 1; |
| 219 | 219 | } |
| 220 | 220 | if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) { |
| 221 | - $unique_ID = $attr['savedQueryUnique']; | |
| 221 | + $ultp_unique_ID = $attr['savedQueryUnique']; | |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | $block_name = 'post-grid-2'; |
| 225 | 225 | $wraper_before = $wraper_after = $post_loop = ''; |
| @@ -235,9 +235,9 @@ | ||
| 235 | 235 | $dummy_url = ULTP_URL . 'assets/img/ultp-fallback-img.png'; |
| 236 | 236 | |
| 237 | 237 | // Loadmore and Unique content |
| 238 | 238 | if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) { |
| 239 | - $unique_ID = $attr['loadMoreQueryUnique']; | |
| 239 | + $ultp_unique_ID = $attr['loadMoreQueryUnique']; | |
| 240 | 240 | $current_unique_posts = $attr['ultp_current_unique_posts']; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : ''; |
| @@ -263,9 +263,9 @@ | ||
| 263 | 263 | // Pagination Block Html |
| 264 | 264 | include ULTP_PATH . 'blocks/template/pagination_block.php'; |
| 265 | 265 | |
| 266 | 266 | $wraper_before .= '<div ' . ( $attr['advanceId'] ? 'id="' . $attr['advanceId'] . '" ' : '' ) . ' class="ultp-post-grid-block wp-block-ultimate-post-' . $block_name . ' ultp-block-' . $attr['blockId'] . '' . ( $attr['align'] ? ' align' . $attr['align'] : '' ) . '' . ( $attr['className'] ? ' ' . $attr['className'] : '' ) . ' ' . $iscroll . '">'; |
| 267 | - $wraper_before .= '<div class="ultp-block-wrapper ' . $wrap_data . '">'; | |
| 267 | + $wraper_before .= '<div class="ultp-block-wrapper" ' . $wrap_data . '>'; | |
| 268 | 268 | |
| 269 | 269 | // Loading |
| 270 | 270 | $wraper_before .= ultimate_post()->postx_loading(); |
| 271 | 271 | |
| @@ -310,9 +310,9 @@ | ||
| 310 | 310 | |
| 311 | 311 | include ULTP_PATH . 'blocks/template/category.php'; |
| 312 | 312 | |
| 313 | 313 | if ( $attr['queryUnique'] ) { |
| 314 | - $unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 314 | + $ultp_unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 315 | 315 | $current_unique_posts[] = $post_id; |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | $post_loop .= '<' . $attr['contentTag'] . ' class="ultp-block-item post-id-' . $post_id . ( $attr['titleAnimation'] ? ' ultp-animation-' . $attr['titleAnimation'] : '' ) . '">'; |
| @@ -405,9 +405,9 @@ | ||
| 405 | 405 | $post_loop .= '</' . $attr['contentTag'] . '>'; |
| 406 | 406 | ++$idx; |
| 407 | 407 | endwhile; |
| 408 | 408 | if ( $attr['queryUnique'] ) { |
| 409 | - $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>'; | |
| 409 | + $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>'; | |
| 410 | 410 | } |
| 411 | 411 | // if ( ($attr['paginationShow'] || $attr['advPaginationEnable']) && ($attr['paginationType'] == 'loadMore')) { |
| 412 | 412 | // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>'; |
| 413 | 413 | // } |
| @@ -431,9 +431,9 @@ | ||
| 431 | 431 | $wraper_after .= '</div>'; |
| 432 | 432 | $wraper_after .= $pagi_block_html; |
| 433 | 433 | $wraper_after .= '</div>'; |
| 434 | 434 | |
| 435 | - wp_reset_query(); | |
| 435 | + wp_reset_postdata(); | |
| 436 | 436 | } else { |
| 437 | 437 | $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] ); |
| 438 | 438 | } |
| 439 | 439 | |