1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
jQuery(document).ready(function() { getDiagnosticData(); }); /** */ function getDiagnosticData() { var data = { 'action' : 'postman_diagnostics' }; jQuery.post(ajaxurl, data, function(response) { if (response.success) { jQuery('#diagnostic-text').val(response.data.message); } }).fail(function(response) { ajaxFailed(response); }); }