[buddypress-trac] [BuddyPress Trac] #8131: Make bp.apiRequest directly return the BP REST API error instead of the full xhr object.
buddypress-trac
noreply at wordpress.org
Sat Sep 7 17:26:27 UTC 2019
#8131: Make bp.apiRequest directly return the BP REST API error instead of the
full xhr object.
-------------------------+---------------------
Reporter: imath | Owner: imath
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.0.0
Component: Core | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch |
-------------------------+---------------------
Changes (by imath):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"12454" 12454]:
{{{
#!CommitTicketReference repository="" revision="12454"
Improve the `bp.apiRequest()` JS function and some PHP code indentation
`bp.apiRequest()` will make sure to return the JSON response object in
case of an error. In case this JSON response object is not available a
default error object will be used.
When WordPress version is lower than 4.9, the same function will make sure
to override the `url` option with the REST API root URL only if this
option is not already set. Moreover the Nonce header is now only added for
REST API requests made on the current site domain.
The PHP code indentation of `bp-core/bp-core-rest-api.php` file has been
improved.
Fixes #8131
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8131#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list