PluginProbe
Post Grid Gutenberg Blocks – PostX / 5.1.1
Post Grid Gutenberg Blocks – PostX v5.1.1
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_7.php +14 -14 5.0.31 → 5.1.1 View file →
@@ -223,9 +223,9 @@
223 223
224 224 public function content( $attr, $noAjax ) {
225 225 $attr = wp_parse_args( $attr, $this->get_attributes() );
226 226 // $attr['queryNumPosts'] = isset($attr['queryNumPosts']) ? $attr['queryNumPosts'] : (object)['lg'=> $attr['queryNumber']];
227 - global $unique_ID;
227 + global $ultp_unique_ID;
228 228
229 229 if ( ! $noAjax ) {
230 230 $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' );
231 231 $attr['paged'] = $paged ? $paged : 1;
@@ -230,9 +230,9 @@
230 230 $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' );
231 231 $attr['paged'] = $paged ? $paged : 1;
232 232 }
233 233 if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) {
234 - $unique_ID = $attr['savedQueryUnique'];
234 + $ultp_unique_ID = $attr['savedQueryUnique'];
235 235 }
236 236
237 237 $block_name = 'post-grid-7';
238 238 $vid_icon_redirect = true; // Its used for video icon do not remove it
@@ -243,9 +243,9 @@
243 243 $dummy_url = ULTP_URL . 'assets/img/ultp-fallback-img.png';
244 244
245 245 // Loadmore and Unique content
246 246 if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) {
247 - $unique_ID = $attr['loadMoreQueryUnique'];
247 + $ultp_unique_ID = $attr['loadMoreQueryUnique'];
248 248 $current_unique_posts = $attr['ultp_current_unique_posts'];
249 249 }
250 250
251 251 $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : '';
@@ -272,16 +272,16 @@
272 272 // Loading
273 273 $wraper_before .= ultimate_post()->postx_loading();
274 274
275 275 if ( $attr['headingShow'] || $attr['filterShow'] || $attr['paginationShow'] ) {
276 - $wraper_before .= '<div class="ultp - heading - filter">';
277 - $wraper_before .= '<div class="ultp - heading - filter - in">';
276 + $wraper_before .= '<div class="ultp-heading-filter">';
277 + $wraper_before .= '<div class="ultp-heading-filter-in">';
278 278
279 279 // Heading
280 280 include ULTP_PATH . 'blocks/template/heading.php';
281 281
282 282 if ( $attr['filterShow'] || $attr['paginationShow'] ) {
283 - $wraper_before .= '<div class="ultp - filter - navigation">';
283 + $wraper_before .= '<div class="ultp-filter-navigation">';
284 284
285 285 // Filter
286 286 if ( $attr['filterShow'] && $attr['queryType'] != 'posts' && $attr['queryType'] != 'customPosts' ) {
287 287 include ULTP_PATH . 'blocks/template/filter.php';
@@ -297,9 +297,9 @@
297 297 $wraper_before .= '</div>';
298 298 $wraper_before .= '</div>';
299 299 }
300 300
301 - $wraper_before .= '<div class="ultp - block - items - wrap ultp - block - row ultp - ' . $attr['layout'] . '">';
301 + $wraper_before .= '<div class="ultp-block-items-wrap ultp-block-row ultp-' . $attr['layout'] . '">';
302 302 $idx = 0;
303 303 while ( $recent_posts->have_posts() ) :
304 304 $recent_posts->the_post();
305 305
@@ -313,17 +313,17 @@
313 313
314 314 include ULTP_PATH . 'blocks/template/category.php';
315 315
316 316 if ( $attr['queryUnique'] ) {
317 - $unique_ID[ $attr['queryUnique'] ][] = $post_id;
317 + $ultp_unique_ID[ $attr['queryUnique'] ][] = $post_id;
318 318 $current_unique_posts[] = $post_id;
319 319 }
320 320
321 - $post_loop .= '<' . $attr['contentTag'] . ' class="ultp - block - item post - id - ' . $post_id . ' ultp - block - item - ' . $idx . ( $attr['titleAnimation'] ? ' ultp - animation - ' . $attr['titleAnimation'] : '' ) . '">';
322 - $post_loop .= '<div class="ultp - block - content - wrap ultp - block - content - overlay">';
321 + $post_loop .= '<' . $attr['contentTag'] . ' class="ultp-block-item post-id-' . $post_id . ' ultp-block-item-' . $idx . ( $attr['titleAnimation'] ? ' ultp-animation-' . $attr['titleAnimation'] : '' ) . '">';
322 + $post_loop .= '<div class="ultp-block-content-wrap ultp-block-content-overlay">';
323 323
324 324 if ( ( $post_thumb_id || $attr['fallbackEnable'] ) && $attr['showImage'] ) {
325 - $post_loop .= '<div class="ultp - block - image ultp - block - image - ' . $attr['imgAnimation'] . ( $attr['imgOverlay'] ? ' ultp - block - image - overlay ultp - block - image - ' . $attr['imgOverlayType'] : '' ) . '">';
325 + $post_loop .= '<div class="ultp-block-image ultp-block-image-' . $attr['imgAnimation'] . ( $attr['imgOverlay'] ? ' ultp-block-image-overlay ultp-block-image-' . $attr['imgOverlayType'] : '' ) . '">';
326 326 $srcset = $attr['imgSrcset'] ? 'srcset="' . esc_attr( wp_get_attachment_image_srcset( $post_thumb_id ) ) . '"' : '';
327 327 // Post Image Size
328 328 $imgSize = $idx == 0 ? $attr['imgCrop'] : $attr['imgCropSmall'];
329 329 $post_loop .= '<a href="' . $titlelink . '" ' . ( $attr['openInTab'] ? 'target="_blank"' : '' ) . '>';
@@ -336,9 +336,9 @@
336 336 $post_loop .= ultimate_post()->get_image( $attr['fallbackImg']['id'], $imgSize, '', $title, $attr['imgSrcset'], $attr['imgLazy'] );
337 337 } else {
338 338 // Default Fallback Image
339 339 $video = ultimate_post()->get_youtube_id( $post_video );
340 - $post_loop .= '<img src="' . ( $video ? 'https:// img.youtube.com/vi/' . $video . '/0.jpg' : $dummy_url ) . '" alt="dummy-img" />';
340 + $post_loop .= '<img src="' . ( $video ? 'https://img.youtube.com/vi/' . $video . '/0.jpg' : $dummy_url ) . '" alt="dummy-img" />';
341 341 }
342 342 }
343 343 $post_loop .= '</a>';
344 344 if ( ( $attr['catPosition'] != 'aboveTitle' ) && ( $idx == 0 || $attr['showSmallCat'] || ( $idx == 3 && $attr['layout'] == 'layout4' ) ) && $attr['catShow'] ) {
@@ -417,9 +417,9 @@
417 417 $post_loop .= '</' . $attr['contentTag'] . '>';
418 418 ++$idx;
419 419 endwhile;
420 420 if ( $attr['queryUnique'] ) {
421 - $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>';
421 + $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>';
422 422 }
423 423
424 424 // if ( $attr['advPaginationEnable'] && ($attr['paginationType'] == 'loadMore')) {
425 425 // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>';
@@ -435,9 +435,9 @@
435 435 $wraper_after .= '</div>';
436 436 $wraper_after .= $pagi_block_html;
437 437 $wraper_after .= '</div>';
438 438
439 - wp_reset_query();
439 + wp_reset_postdata();
440 440 } else {
441 441 $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] );
442 442 }
443 443