pre_months_dropdown_query
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-admin/includes/class-wp-list-table.php 728
$months = apply_filters( 'pre_months_dropdown_query', false, $post_type );