pre_months_dropdown_query хук-фильтрWP 5.7.0

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

Использование

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.
По умолчанию: false
$post_type(строка)
The post type.

Список изменений

С версии 5.7.0 Введена.

Где вызывается хук

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 );

Где используется хук в WordPress

Использование не найдено.