Make the `WP_List_Table::months_dropdown()` query results filterable.

Introduces the `months_dropdown_results` filter.

Fixes #17022.

Built from https://develop.svn.wordpress.org/trunk@25556


git-svn-id: http://core.svn.wordpress.org/trunk@25476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2013-09-21 18:35:09 +00:00
parent 11db0d3b01
commit c5abe8acaa
1 changed files with 10 additions and 0 deletions

View File

@ -367,6 +367,16 @@ class WP_List_Table {
ORDER BY post_date DESC
", $post_type ) );
/**
* Filter the months dropdown results.
*
* @since 3.7.0
*
* @param object $months The months dropdown 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 ) )