wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_checkdate › WordPress Function

Da3.5.0
Deprecaton/a
› wp_checkdate ( $month, $day, $year, $source_date )
Parametri: (4)
  • (int|string) $month Month number.
    Richiesto: Sì
  • (int|string) $day Day number.
    Richiesto: Sì
  • (int|string) $year Year number.
    Richiesto: Sì
  • (string) $source_date The date to filter.
    Richiesto: Sì
Links:
Ritorna:
  • (bool) True if valid date, false if not valid date.
Definito a:
Codex:

Tests if the supplied date is valid for the Gregorian calendar.



Sorgenti

function wp_checkdate( $month, $day, $year, $source_date ) {
	$checkdate = false;
	if ( is_numeric( $month ) && is_numeric( $day ) && is_numeric( $year ) ) {
		$checkdate = checkdate( (int) $month, (int) $day, (int) $year );
	}

	/**
	 * 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.
	 */
	return apply_filters( 'wp_checkdate', $checkdate, $source_date );
}