Changes between Version 1 and Version 2 of Ticket #14618
- Timestamp:
- 08/15/2010 02:26:08 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #14618 – Description
v1 v2 47 47 A response to the previous might look like this: 48 48 49 `{"jsonrpc": "2.0", "result": "deleted", "id": 4567}`49 `{"jsonrpc": "2.0", "result": {"action":"deleted", "commentID":123}, "id": 4567}` 50 50 51 51 WordPress would provide the JS for making the JSON requests, attaching listeners and matching responses to the appropriate callbacks by ID. Perhaps like so: … … 55 55 56 56 function myCallback( result ) { 57 alert('Comment ID #' + result + ' deleted!'); 57 if ( 'deleted' == result.action ) 58 alert('Comment ID #' + result.commentID + ' deleted!'); 58 59 } 59 60