[wp-trac] [WordPress Trac] #39854: REST API: Add gmt_offset to base /wp-json response
WordPress Trac
noreply at wordpress.org
Tue Feb 21 18:28:37 UTC 2017
#39854: REST API: Add gmt_offset to base /wp-json response
-------------------------+-----------------------
Reporter: jnylen0 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.8
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: | Focuses: rest-api
-------------------------+-----------------------
Comment (by jnylen0):
Hi @sagarkbhatt! Thanks for uploading a patch. However, I think we need
to only show this information for an authenticated request with
`?context=edit`.
We also need to make sure that `gmt_offset` returns an appropriate value
even if the `timezone_string` is set instead, to e.g. `America/New_York`.
These two options behave a bit strangely together.
Finally we'll want unit tests for each of these cases -
https://make.wordpress.org/core/handbook/testing/automated-
testing/phpunit/
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39854#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list