Ticket #1918: replies_widget_query_filter.diff
File replies_widget_query_filter.diff, 859 bytes (added by , 6 years ago) |
---|
-
includes/common/widgets.
old new 1129 1129 1130 1130 // Note: private and hidden forums will be excluded via the 1131 1131 // bbp_pre_get_posts_normalize_forum_visibility action and function. 1132 $widget_query = new WP_Query(array(1132 $widget_query = array( 1133 1133 'post_type' => bbp_get_reply_post_type(), 1134 1134 'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ), 1135 1135 'posts_per_page' => (int) $settings['max_shown'], 1136 1136 'ignore_sticky_posts' => true, 1137 1137 'no_found_rows' => true, 1138 ) ); 1138 ); 1139 $widget_query = apply_filters( 'bbp_replies_widget_query', $widget_query ); 1140 $widget_query = new WP_Query( $widget_query ); 1139 1141 1140 1142 // Bail if no replies 1141 1143 if ( ! $widget_query->have_posts() ) {