Changes between Version 1 and Version 3 of Ticket #40626
- Timestamp:
- 05/01/2017 10:52:56 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #40626
-
Property
Status
changed from
newtoaccepted - Property Keywords has-patch has-unit-tests needs-refresh added
-
Property
Version
changed from
to4.7 -
Property
Milestone
changed from
Awaiting Reviewto4.7.5 - Property Owner set to jnylen0
-
Property
Status
changed from
-
Ticket #40626 – Description
v1 v3 1 Calling functions like `get_post()` do not work within the Post Revisions API endpoint since they don't have a line like `$GLOBALS['post'] = $post;` which the posts controller does have https://github.com/WordPress/WordPress/blob/ master/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php#L1381-L1383.1 Calling functions like `get_post()` do not work within the Post Revisions API endpoint since they don't have a line like `$GLOBALS['post'] = $post;` which the posts controller does have https://github.com/WordPress/WordPress/blob/4.7.4/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php#L1381-L1383. 2 2 3 3 Fix if I understand the issue would be to add those two lines to `prepare_item_for_response` in the revisions controller.