WP_REST_Posts_Controller::prepare_date_response

SummerySummery

Checks the post_date_gmt or modified_gmt and prepare any post or modified date for single post output.

Syntax

WP_REST_Posts_Controller::prepare_date_response( string $date_gmt, string|null $date = null )

ParametersParameters

$date_gmt

(string) (Required) GMT publication time.

$date

(string|null) (Optional) Local publication time.

Default value: null

ReturnReturn

(string|null) ISO8601/RFC3339 formatted datetime.

SourceSource

File: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top