PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.1
Forumax – AI Powered Advanced Community Forum Plugin v2.5.1
2.5.1 2.5.0 2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 All 31 releases
← All changes | widgets/Forumax_Recent_Replies.php +5 -1 2.4.1 → 2.5.1 View file →
@@ -62,9 +62,10 @@
62 62 'posts_per_page' => (int) $settings['max_shown'],
63 63 'ignore_sticky_posts' => true,
64 64 'no_found_rows' => true,
65 65 'update_post_term_cache' => false,
66 - 'update_post_meta_cache' => false
66 + // The loop reads each reply's topic/author meta; load it in one query.
67 + 'update_post_meta_cache' => true
67 68 ));
68 69
69 70 // Bail if no replies are found
70 71 if (!$widget_query->have_posts()) {
@@ -69,8 +70,11 @@
69 70 // Bail if no replies are found
70 71 if (!$widget_query->have_posts()) {
71 72 return;
72 73 }
74 +
75 + // Parent topics are used for titles and links; fetch them together.
76 + _prime_post_caches(array_unique(wp_list_pluck($widget_query->posts, 'post_parent')), false, true);
73 77
74 78 echo $args['before_widget'];
75 79
76 80 if (!empty($settings['title'])) {