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/ramble-grid/module.php +8 -4 4.5.0 → 4.5.6 View file →
@@ -63,8 +63,11 @@
63 63 ],
64 64 $settings
65 65 );
66 66
67 + // Fill display flags the request may have omitted (see trait) before the render loop reads them.
68 + $settings = array_merge( $this->loadmore_display_defaults(), $settings );
69 +
67 70 $ajaxposts = $this->query_args( $settings );
68 71
69 72 ob_start();
70 73 $found_posts = false;
@@ -181,11 +184,11 @@
181 184 if (has_excerpt()) {
182 185 the_excerpt();
183 186 } else {
184 187 if (function_exists('ultimate_post_kit_custom_excerpt')) {
185 - echo wp_kses_post(ultimate_post_kit_custom_excerpt(intval($settings['excerpt_length'] ?? 20), false, ''));
188 + echo wp_kses_post(ultimate_post_kit_custom_excerpt(ultimate_post_kit_clamp_excerpt_length($settings['excerpt_length'] ?? 20, 20), false, ''));
186 189 } else {
187 - echo esc_html(wp_trim_words(wp_strip_all_tags(get_the_content()), intval($settings['excerpt_length'] ?? 20)));
190 + echo esc_html(wp_trim_words(wp_strip_all_tags(get_the_content()), ultimate_post_kit_clamp_excerpt_length($settings['excerpt_length'] ?? 20, 20)));
188 191 }
189 192 }
190 193 ?>
191 194 </div>
@@ -198,11 +201,12 @@
198 201 <?php if ($settings['show_readmore'] === 'yes') : ?>
199 202 <a href="<?php echo esc_url($post_link); ?>" class="upk-readmore" target="<?php echo esc_attr($settings['upk_link_new_tab'] === 'yes' ? '_blank' : '_self'); ?>">
200 203 <span class="upk-flex upk-flex-middle">
201 204 <?php echo esc_html($settings['readmore_text'] ?? __('Read More', 'ultimate-post-kit')); ?>
202 - <?php if ($settings['readmore_icon']['value']) : ?>
205 + <?php $upk_readmore_icon = ultimate_post_kit_sanitize_request_icon($settings['readmore_icon'] ?? null); ?>
206 + <?php if ($upk_readmore_icon) : ?>
203 207 <span class="upk-readmore-btn-icon upk-flex-align-<?php echo esc_attr($settings['icon_align']); ?>">
204 - <?php Icons_Manager::render_icon($settings['readmore_icon'], ['aria-hidden' => 'true', 'class' => 'fa-fw']); ?>
208 + <?php Icons_Manager::render_icon($upk_readmore_icon, ['aria-hidden' => 'true', 'class' => 'fa-fw']); ?>
205 209 </span>
206 210 <?php endif; ?>
207 211 </span>
208 212 </a>