# wp-comment-fields/1.7/js/script.js

Comments Extra Fields For Post,Pages and CPT, version 1.7. 48 lines.

- Page: https://pluginprobe.com/plugins/wp-comment-fields/1.7/code/js/script.js
- Raw: https://pluginprobe.com/plugins/wp-comment-fields/1.7/raw/js/script.js
- Modified: 2020-02-02T09:07:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-comment-fields/1.7/code/js/script.js#L10-L20`.

```javascript
/*
 * NOTE: all actions are prefixed by plugin shortnam_action_name
 */

jQuery(function(){
	

});


function doPost(){
	
	//alert(nm_list_vars.ajaxurl);
	/*
	 * TODO: change shortname
	 */
	var data = {action: 'nm_wpcomments_save_file', user_name: 'admin'};
	
	jQuery.post(nm_wpcomments_vars.ajaxurl, data, function(resp){
		
		console.log(resp);
	});
}


function get_option(key){
	
	/*
	 * TODO: change plugin shortname
	 */
	var keyprefix = 'nm_wpcomments';
	
	key = keyprefix + key;
	
	var req_option = '';
	
	jQuery.each(googlerabwah_vars.settings, function(k, option){
		
		//console.log(k);
		
		if (k == key)
			req_option = option;		
	});
	
	//console.log(req_option);
	return req_option;
	
}
```
