| @@ -217,9 +217,9 @@ | ||
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | public function content( $attr, $noAjax ) { |
| 220 | 220 | $attr = wp_parse_args( $attr, $this->get_attributes() ); |
| 221 | - global $unique_ID; | |
| 221 | + global $ultp_unique_ID; | |
| 222 | 222 | |
| 223 | 223 | if ( ! $noAjax ) { |
| 224 | 224 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 225 | 225 | $attr['paged'] = $paged ? $paged : 1; |
| @@ -224,9 +224,9 @@ | ||
| 224 | 224 | $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); |
| 225 | 225 | $attr['paged'] = $paged ? $paged : 1; |
| 226 | 226 | } |
| 227 | 227 | if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) { |
| 228 | - $unique_ID = $attr['savedQueryUnique']; | |
| 228 | + $ultp_unique_ID = $attr['savedQueryUnique']; | |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | $block_name = 'post-grid-3'; |
| 232 | 232 | $vid_icon_redirect = true; // Its used for video icon do not remove it |
| @@ -238,9 +238,9 @@ | ||
| 238 | 238 | $dummy_url = ULTP_URL . 'assets/img/ultp-fallback-img.png'; |
| 239 | 239 | |
| 240 | 240 | // Loadmore and Unique content |
| 241 | 241 | if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) { |
| 242 | - $unique_ID = $attr['loadMoreQueryUnique']; | |
| 242 | + $ultp_unique_ID = $attr['loadMoreQueryUnique']; | |
| 243 | 243 | $current_unique_posts = $attr['ultp_current_unique_posts']; |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : ''; |
| @@ -269,9 +269,9 @@ | ||
| 269 | 269 | // Pagination Block Html |
| 270 | 270 | include ULTP_PATH . 'blocks/template/pagination_block.php'; |
| 271 | 271 | |
| 272 | 272 | $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 . '">'; |
| 273 | - $wraper_before .= '<div class="ultp-block-wrapper ' . $wrap_data . '">'; | |
| 273 | + $wraper_before .= '<div class="ultp-block-wrapper" ' . $wrap_data . '>'; | |
| 274 | 274 | |
| 275 | 275 | // Loading |
| 276 | 276 | $wraper_before .= ultimate_post()->postx_loading(); |
| 277 | 277 | |
| @@ -316,9 +316,9 @@ | ||
| 316 | 316 | |
| 317 | 317 | include ULTP_PATH . 'blocks/template/category.php'; |
| 318 | 318 | |
| 319 | 319 | if ( $attr['queryUnique'] ) { |
| 320 | - $unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 320 | + $ultp_unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 321 | 321 | $current_unique_posts[] = $post_id; |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | $post_loop .= '<' . $attr['contentTag'] . ' class="ultp-block-item post-id-' . $post_id . ( $attr['titleAnimation'] ? ' ultp-animation-' . $attr['titleAnimation'] : '' ) . '">'; |
| @@ -415,9 +415,9 @@ | ||
| 415 | 415 | $post_loop .= '</' . $attr['contentTag'] . '>'; |
| 416 | 416 | ++$idx; |
| 417 | 417 | endwhile; |
| 418 | 418 | if ( $attr['queryUnique'] ) { |
| 419 | - $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>'; | |
| 419 | + $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>'; | |
| 420 | 420 | } |
| 421 | 421 | // if ( ($attr['paginationShow'] || $attr['advPaginationEnable']) && ($attr['paginationType'] == 'loadMore')) { |
| 422 | 422 | // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>'; |
| 423 | 423 | // } |
| @@ -442,9 +442,9 @@ | ||
| 442 | 442 | $wraper_after .= '</div>'; |
| 443 | 443 | $wraper_after .= $pagi_block_html; |
| 444 | 444 | $wraper_after .= '</div>'; |
| 445 | 445 | |
| 446 | - wp_reset_query(); | |
| 446 | + wp_reset_postdata(); | |
| 447 | 447 | } else { |
| 448 | 448 | $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] ); |
| 449 | 449 | } |
| 450 | 450 | |