| @@ -72,8 +72,11 @@ | ||
| 72 | 72 | ], |
| 73 | 73 | $settings |
| 74 | 74 | ); |
| 75 | 75 | |
| 76 | + // Fill display flags the request may have omitted (see trait) before the render loop reads them. | |
| 77 | + $settings = array_merge( $this->loadmore_display_defaults(), $settings ); | |
| 78 | + | |
| 76 | 79 | $ajaxposts = $this->query_args( $settings ); |
| 77 | 80 | |
| 78 | 81 | ob_start(); |
| 79 | 82 | $found_posts = false; |
| @@ -86,9 +89,9 @@ | ||
| 86 | 89 | $title = get_the_title(); |
| 87 | 90 | $post_link = esc_url(get_permalink()); |
| 88 | 91 | $image_src = wp_get_attachment_image_url(get_post_thumbnail_id(), 'large'); |
| 89 | 92 | $image_src = $image_src ? esc_url($image_src) : esc_url(\Elementor\Utils::get_placeholder_image_src()); |
| 90 | - $category = wp_kses_post(upk_get_category($post_type)); | |
| 93 | + $category = wp_kses_post(upk_get_category($settings['posts_source'] ?? 'post')); | |
| 91 | 94 | $author_url = esc_url(get_author_posts_url(get_the_author_meta('ID'))); |
| 92 | 95 | $author_name = esc_html(get_the_author()); |
| 93 | 96 | $title_tag = Utils::get_valid_html_tag($settings['title_tags'] ); |
| 94 | 97 | |