Make the WP_List_Table::months_dropdown()
query results filterable.
Introduces the `months_dropdown_results` filter. Fixes #17022. git-svn-id: https://develop.svn.wordpress.org/trunk@25556 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0d5bebfe0e
commit
8c8a0b990c
@ -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 ) )
|
||||
|
Loading…
Reference in New Issue
Block a user