| @@ -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; |
| @@ -164,9 +167,9 @@ | ||
| 164 | 167 | <?php |
| 165 | 168 | echo esc_html( |
| 166 | 169 | wp_trim_words( |
| 167 | 170 | get_the_excerpt(), |
| 168 | - absint( $settings['excerpt_length'] ?? 20 ), | |
| 171 | + ultimate_post_kit_clamp_excerpt_length( $settings['excerpt_length'] ?? 20, 20 ), | |
| 169 | 172 | '...' |
| 170 | 173 | ) |
| 171 | 174 | ); |
| 172 | 175 | ?> |
| @@ -174,11 +177,12 @@ | ||
| 174 | 177 | |
| 175 | 178 | <?php if ( $settings['readmore_type'] === 'classic' ) : ?> |
| 176 | 179 | <a href="<?php echo esc_url( $post_link ); ?>" class="upk-readmore upk-display-inline-block"> |
| 177 | 180 | <?php echo esc_html( $readmore_text ); ?> |
| 178 | - <?php if ( $settings['readmore_icon']['value'] ) : ?> | |
| 181 | + <?php $upk_readmore_icon = ultimate_post_kit_sanitize_request_icon( $settings['readmore_icon'] ?? null ); ?> | |
| 182 | + <?php if ( $upk_readmore_icon ) : ?> | |
| 179 | 183 | <span class="upk-button-icon-align-<?php echo esc_attr( $settings['readmore_icon_align'] ); ?>"> |
| 180 | - <?php Icons_Manager::render_icon( $settings['readmore_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] ); ?> | |
| 184 | + <?php Icons_Manager::render_icon( $upk_readmore_icon, [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] ); ?> | |
| 181 | 185 | </span> |
| 182 | 186 | <?php endif; ?> |
| 183 | 187 | </a> |
| 184 | 188 | <?php endif; ?> |