PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.6
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.6
4.5.6 4.5.5 4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 All 148 releases
← All changes | modules/alice-grid/module.php +10 -1 4.2.0 → 4.5.6 View file →
@@ -32,8 +32,14 @@
32 32 return $widgets;
33 33 }
34 34
35 35 public function callback_ajax_loadmore_posts() {
36 + // Verify the front-end nonce (sent by UltimatePostKitConfig.nonce) before
37 + // processing this public load-more request.
38 + if ( ! check_ajax_referer( 'upk-site', 'nonce', false ) ) {
39 + wp_send_json_error( array( 'message' => esc_html__( 'Security check failed.', 'ultimate-post-kit' ) ), 403 );
40 + }
41 +
36 42
37 43 $settings = [];
38 44
39 45 if ( isset( $_POST['settings'] ) && is_array( $_POST['settings'] ) ) {
@@ -55,8 +61,11 @@
55 61 ],
56 62 $settings
57 63 );
58 64
65 + // Fill display flags the request may have omitted (see trait) before the render loop reads them.
66 + $settings = array_merge( $this->loadmore_display_defaults(), $settings );
67 +
59 68 $ajaxposts = $this->query_args($settings);
60 69
61 70 ob_start();
62 71 $found_posts = false;
@@ -87,9 +96,9 @@
87 96 </div>
88 97
89 98 <?php if ( isset( $settings['show_category'] ) && 'yes' === $settings['show_category'] ) : ?>
90 99 <div class="upk-category">
91 - <?php echo wp_kses_post( upk_get_category( $settings['post_source'] ) ); ?>
100 + <?php echo wp_kses_post( upk_get_category( $settings['posts_source'] ?? 'post' ) ); ?>
92 101 </div>
93 102 <?php endif; ?>
94 103
95 104 <div class="upk-content">