wp_checkdate
Filters whether the given date is valid for the Gregorian calendar.
Использование
add_filter( 'wp_checkdate', 'wp_kama_checkdate_filter', 10, 2 ); /** * Function for `wp_checkdate` filter-hook. * * @param bool $checkdate Whether the given date is valid. * @param string $source_date Date to check. * * @return bool */ function wp_kama_checkdate_filter( $checkdate, $source_date ){ // filter... return $checkdate; }
- $checkdate(true|false)
- Whether the given date is valid.
- $source_date(строка)
- Date to check.
Список изменений
С версии 3.5.0 | Введена. |
Где вызывается хук
wp_checkdate
wp-includes/functions.php 7394
return apply_filters( 'wp_checkdate', checkdate( $month, $day, $year ), $source_date );