months_dropdown_results
Filters the 'Months' drop-down results.
Usage
add_filter( 'months_dropdown_results', 'wp_kama_months_dropdown_results_filter', 10, 2 ); /** * Function for `months_dropdown_results` filter-hook. * * @param object[] $months Array of the months drop-down query results. * @param string $post_type The post type. * * @return object[] */ function wp_kama_months_dropdown_results_filter( $months, $post_type ){ // filter... return $months; }
- $months(object[])
- Array of the months drop-down query results.
- $post_type(string)
- The post type.
Changelog
Since 3.7.0 | Introduced. |
Where the hook is called
wp-admin/includes/class-wp-list-table.php 758
$months = apply_filters( 'months_dropdown_results', $months, $post_type );