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:
parent
11db0d3b01
commit
c5abe8acaa
|
@ -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