Filter hook 'wp_checkdate'

in WP Core File wp-includes/functions.php at line 7394

View Source

wp_checkdate

Filter Hook
Description
Filters whether the given date is valid for the Gregorian calendar.

Hook Information

File Location wp-includes/functions.php View on GitHub
Hook Type Filter
Line Number 7394

Hook Parameters

Type Name Description
bool $checkdate Whether the given date is valid.
string $source_date Date to check.

Usage Examples

Basic Usage
<?php
// Hook into wp_checkdate
add_filter('wp_checkdate', 'my_custom_filter', 10, 2);

function my_custom_filter($checkdate, $source_date) {
    // Your custom filtering logic here
    return $checkdate;
}

Source Code Context

wp-includes/functions.php:7394 - How this hook is used in WordPress core
<?php
7389  	 * @since 3.5.0
7390  	 *
7391  	 * @param bool   $checkdate   Whether the given date is valid.
7392  	 * @param string $source_date Date to check.
7393  	 */
7394  	return apply_filters( 'wp_checkdate', checkdate( $month, $day, $year ), $source_date );
7395  }
7396  
7397  /**
7398   * Loads the auth check for monitoring whether the user is still logged in.
7399   *

PHP Documentation

<?php
/**
	 * Filters whether the given date is valid for the Gregorian calendar.
	 *
	 * @since 3.5.0
	 *
	 * @param bool   $checkdate   Whether the given date is valid.
	 * @param string $source_date Date to check.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/functions.php
Related Hooks

Related hooks will be displayed here in future updates.