rest_parse_date

Advertisement

Summery Summery

Parses an RFC3339 time into a Unix timestamp.

Syntax Syntax

rest_parse_date( string $date, bool $force_utc = false )

Parameters Parameters

$date

(Required) RFC3339 timestamp.

$force_utc

(Optional) Whether to force UTC timezone instead of using the timestamp's timezone.

Default value: false

Return Return

(int) Unix timestamp.

Source Source

File: wp-includes/rest-api.php

 * @global mixed          $wp_rest_auth_cookie
 *
 * @param WP_Error|mixed $result Error from another authentication handler,
 *                               null if we should handle it, or another value if not.
 * @return WP_Error|mixed|bool WP_Error if the cookie is invalid, the $result, otherwise true.
 */
function rest_cookie_check_errors( $result ) {
	if ( ! empty( $result ) ) {
		return $result;
	}

	global $wp_rest_auth_cookie;

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Advertisement

Leave a Reply