| @@ -42,8 +42,9 @@ | ||
| 42 | 42 | * @param array $instance Instance |
| 43 | 43 | */ |
| 44 | 44 | public function widget($args = array(), $instance = array()) |
| 45 | 45 | { |
| 46 | + wp_enqueue_style('bbpc-forum'); | |
| 46 | 47 | |
| 47 | 48 | // Get widget settings |
| 48 | 49 | $settings = $this->parse_settings($instance); |
| 49 | 50 | |
| @@ -73,9 +74,10 @@ | ||
| 73 | 74 | 'order' => 'DESC', |
| 74 | 75 | 'ignore_sticky_posts' => true, |
| 75 | 76 | 'no_found_rows' => true, |
| 76 | 77 | 'update_post_term_cache' => false, |
| 77 | - 'update_post_meta_cache' => false | |
| 78 | + // The loop reads reply counts/freshness meta; load it in one query. | |
| 79 | + 'update_post_meta_cache' => true | |
| 78 | 80 | ); |
| 79 | 81 | break; |
| 80 | 82 | |
| 81 | 83 | // Order by total number of replies |
| @@ -95,9 +97,10 @@ | ||
| 95 | 97 | 'order' => 'DESC', |
| 96 | 98 | 'ignore_sticky_posts' => true, |
| 97 | 99 | 'no_found_rows' => true, |
| 98 | 100 | 'update_post_term_cache' => false, |
| 99 | - 'update_post_meta_cache' => false | |
| 101 | + // The loop reads reply counts/freshness meta; load it in one query. | |
| 102 | + 'update_post_meta_cache' => true | |
| 100 | 103 | ); |
| 101 | 104 | break; |
| 102 | 105 | |
| 103 | 106 | // Order by which topic was created most recently |
| @@ -112,9 +115,10 @@ | ||
| 112 | 115 | 'order' => 'DESC', |
| 113 | 116 | 'ignore_sticky_posts' => true, |
| 114 | 117 | 'no_found_rows' => true, |
| 115 | 118 | 'update_post_term_cache' => false, |
| 116 | - 'update_post_meta_cache' => false | |
| 119 | + // The loop reads reply counts/freshness meta; load it in one query. | |
| 120 | + 'update_post_meta_cache' => true | |
| 117 | 121 | ); |
| 118 | 122 | break; |
| 119 | 123 | } |
| 120 | 124 | |