Opened 5 years ago
Last modified 4 years ago
#49408 new enhancement
Why is the action wp_ajax_wp_link_ajax not using wp_send_json()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.3.2 |
Component: | General | Keywords: | has-patch needs-testing |
Focuses: | coding-standards | Cc: |
Description
The action now returns an array with results with the header content-type text/html
Should this not be application/json as achieved by the wp_send_json() function?
https://core.trac.wordpress.org/browser/tags/5.3.2/src/wp-admin/includes/ajax-actions.php#L1863
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
This could use some testing by someone who understands the functions better than I do :)
Next time, please create a patch from the root directory, but 49408.patch does apply to src.
The code for the
wp_ajax_wp_link_ajax
was added in 3.1 (changeset:16459), andwp_send_json
was created for 3.5. So that's likely why it is not used yet.