diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php index cdd07f076d..3faf5d46e0 100644 --- a/src/wp-admin/includes/class-wp-list-table.php +++ b/src/wp-admin/includes/class-wp-list-table.php @@ -625,18 +625,18 @@ class WP_List_Table { $post_type ) ); - - /** - * Filters the 'Months' drop-down results. - * - * @since 3.7.0 - * - * @param object[] $months Array of the months drop-down query results. - * @param string $post_type The post type. - */ - $months = apply_filters( 'months_dropdown_results', $months, $post_type ); } + /** + * Filters the 'Months' drop-down results. + * + * @since 3.7.0 + * + * @param object[] $months Array of the months drop-down query results. + * @param string $post_type The post type. + */ + $months = apply_filters( 'months_dropdown_results', $months, $post_type ); + $month_count = count( $months ); if ( ! $month_count || ( 1 == $month_count && 0 == $months[0]->month ) ) {