#8043 closed defect (bug) (wontfix)
Convert XProfile admin AJAX to REST API
| Reported by: | boonebgorges | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Extended Profile | Version: | |
| Severity: | normal | Keywords: | needs-patch |
| Cc: |
Description
The existing AJAX in the XProfile admin area is a good first candidate for conversion to the REST API. See https://buddypress.trac.wordpress.org/browser/tags/4.1.0/src/bp-xprofile/bp-xprofile-admin.php#L592, https://buddypress.trac.wordpress.org/browser/tags/4.1.0/src/bp-xprofile/admin/js/admin.js#L228 for some examples.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I've done some in-depth review of the existing AJAX here, and I don't know that there are any easy wins. Most of the interface does not, in fact, use AJAX. The only places where AJAX is actually used are as follows:
preventDefault(), so the delete always takes place via a page refresh anyway. This could use fixing, but it's difficult to pick apart in this context.As such, I'm rescinding my initial suggestion that this is a "good first candidate" :) Moving to the REST API would be part of a more substantial rewrite.