PluginProbe
Post Grid Gutenberg Blocks – PostX / 5.1.0
Post Grid Gutenberg Blocks – PostX v5.1.0
5.1.1 5.1.0 5.0.41 5.0.39 5.0.38 5.0.37 5.0.36 5.0.35 5.0.34 5.0.33 5.0.32 5.0.31 5.0.30 5.0.29 5.0.28 5.0.27 5.0.26 5.0.25 5.0.23 5.0.24 5.0.22 5.0.21 5.0.20 5.0.19 5.0.18 All 240 releases
← All changes | blocks/Post_Grid_2.php +6 -6 5.0.39 → 5.1.0 View file →
@@ -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'] ) : '';
@@ -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