PluginProbe
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards / 5.5.84
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards v5.5.84
5.5.84 5.5.83 5.5.82 5.5.81 5.5.80 5.5.79 5.5.77 5.5.76 5.5.75 5.5.73 5.5.72 5.5.22 5.5.23 5.5.29 5.5.3 5.5.31 5.5.32 5.5.34 5.5.35 5.5.36 5.5.37 5.5.4 5.5.40 5.5.41 5.5.42 All 160 releases
wp-data-access / assets / js / wpda_rest_api.js

wpda_rest_api.js in WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards 5.5.84, at assets/js/wpda_rest_api.js

24 lines 671 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 function wpda_rest_api(path, data, callbackOk, callbackError, method = "POST") {
2 jQuery.ajax({
3 url: wpApiSettings.root + wpdaApiSettings.path + "/" + path,
4 method: method,
5 beforeSend: function (xhr) {
6 xhr.setRequestHeader("X-WP-Nonce", wpApiSettings.nonce);
7 },
8 data: data
9 }).done(function(response) {
10 if (callbackOk!==undefined) {
11 callbackOk(response)
12 } else {
13 console.error("Missing API callback. Server response:")
14 console.error(response)
15 }
16 }).fail(function(response) {
17 if (callbackError!==undefined) {
18 callbackError(response)
19 } else {
20 console.error("Missing API callback. Server response:")
21 console.error(response)
22 }
23 })
24 }