pre_months_dropdown_query filter-hookWP 5.7.0

Filters whether to short-circuit performing the months dropdown query.

Usage

add_filter( 'pre_months_dropdown_query', 'wp_kama_pre_months_dropdown_query_filter', 10, 2 );

/**
 * Function for `pre_months_dropdown_query` filter-hook.
 * 
 * @param object[]|false $months    'Months' drop-down results.
 * @param string         $post_type The post type.
 *
 * @return object[]|false
 */
function wp_kama_pre_months_dropdown_query_filter( $months, $post_type ){

	// filter...
	return $months;
}
$months(object[]|false)
'Months' drop-down results.
Default: false
$post_type(string)
The post type.

Changelog

Since 5.7.0 Introduced.

Where the hook is called

WP_List_Table::months_dropdown()
pre_months_dropdown_query
wp-admin/includes/class-wp-list-table.php 722
$months = apply_filters( 'pre_months_dropdown_query', false, $post_type );

Where the hook is used in WordPress

Usage not found.