months_dropdown_results
Filters the 'Months' drop-down results.
Использование
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(строка)
- The post type.
Список изменений
| С версии 3.7.0 | Введена. |
Где вызывается хук
wp-admin/includes/class-wp-list-table.php 758
$months = apply_filters( 'months_dropdown_results', $months, $post_type );