wp_checkdate
Filters whether the given date is valid for the Gregorian calendar.
Usage
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(string)
- Date to check.
Changelog
| Since 3.5.0 | Introduced. |
Where the hook is called
wp_checkdate
wp-includes/functions.php 7413
return apply_filters( 'wp_checkdate', $checkdate, $source_date );