| 1 |
/* |
| 2 |
* NOTE: all actions are prefixed by plugin shortnam_action_name |
| 3 |
*/ |
| 4 |
|
| 5 |
jQuery(function(){ |
| 6 |
|
| 7 |
|
| 8 |
}); |
| 9 |
|
| 10 |
|
| 11 |
function doPost(){ |
| 12 |
|
| 13 |
//alert(nm_list_vars.ajaxurl); |
| 14 |
/* |
| 15 |
* TODO: change shortname |
| 16 |
*/ |
| 17 |
var data = {action: 'nm_wpcomments_save_file', user_name: 'admin'}; |
| 18 |
|
| 19 |
jQuery.post(nm_wpcomments_vars.ajaxurl, data, function(resp){ |
| 20 |
|
| 21 |
console.log(resp); |
| 22 |
}); |
| 23 |
} |
| 24 |
|
| 25 |
|
| 26 |
function get_option(key){ |
| 27 |
|
| 28 |
/* |
| 29 |
* TODO: change plugin shortname |
| 30 |
*/ |
| 31 |
var keyprefix = 'nm_wpcomments'; |
| 32 |
|
| 33 |
key = keyprefix + key; |
| 34 |
|
| 35 |
var req_option = ''; |
| 36 |
|
| 37 |
jQuery.each(googlerabwah_vars.settings, function(k, option){ |
| 38 |
|
| 39 |
//console.log(k); |
| 40 |
|
| 41 |
if (k == key) |
| 42 |
req_option = option; |
| 43 |
}); |
| 44 |
|
| 45 |
//console.log(req_option); |
| 46 |
return req_option; |
| 47 |
|
| 48 |
} |