Gets the global styles revision, if the ID is valid.
Parameters
$id
intrequired- Supplied ID.
Source
}
if ( rest_is_field_included( 'date', $fields ) ) {
$data['date'] = $this->prepare_date_response( $post->post_date_gmt, $post->post_date );
}
if ( rest_is_field_included( 'date_gmt', $fields ) ) {
$data['date_gmt'] = $this->prepare_date_response( $post->post_date_gmt );
}
if ( rest_is_field_included( 'id', $fields ) ) {
$data['id'] = (int) $post->ID;
}
if ( rest_is_field_included( 'modified', $fields ) ) {
$data['modified'] = $this->prepare_date_response( $post->post_modified_gmt, $post->post_modified );
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.