[wp-trac] [WordPress Trac] #44432: Sometimes, an array is passed to the get_callback provided to register_rest_field() instead of an object
WordPress Trac
noreply at wordpress.org
Thu Aug 15 20:03:29 UTC 2019
#44432: Sometimes, an array is passed to the get_callback provided to
register_rest_field() instead of an object
-------------------------------+--------------------------------
Reporter: salzano | Owner: TimothyBlynJacobs
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Future Release
Component: REST API | Version: 4.7
Severity: normal | Resolution: fixed
Keywords: reporter-feedback | Focuses:
-------------------------------+--------------------------------
Changes (by kadamwhite):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"45810" 45810]:
{{{
#!CommitTicketReference repository="" revision="45810"
REST API: Clarify arguments passed to rest route get & update callbacks.
Update doc block argument definitions to clarify that the REST API always
passes an array to the `get_callback` and always passes an entity object
to the `update_callback`.
Props TimothyBlynJacobs, salzano.
Fixes #44432.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44432#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list