diff --git a/ai-global-activity.php b/ai-global-activity.php index d1fd60f3498999364d762158cbd9588f6336a11b..2421141555a3b66ec0a2990131260e29991aeada 100644 --- a/ai-global-activity.php +++ b/ai-global-activity.php @@ -128,7 +128,7 @@ function ai_activity_get_latest_posts($offset, $limit) { $table_name = AI_ACTIVITY_TABLE_NAME; $results = $wpdb->get_results($wpdb->prepare( " - SELECT blog_id, post_id, title, author, excerpt, url, published_at + SELECT blog_id, post_id, title, author, excerpt, url, thumbnail_url, published_at FROM {$table_name} ORDER BY published_at DESC LIMIT %d OFFSET %d @@ -183,6 +183,10 @@ function ai_activity_display_recent_posts($tmp_number, $tmp_title_characters, $t $html .= "</div>"; } + if ($post->thumbnail_url) { + $html .= "<img src=\"{$post->thumbnail_url}\" class=\"alignleft wp-post-image\">"; + } + $html .= "<div class=\"post-content\">{$post->excerpt}</div>"; $html .= "</div>"; }