Usually all WORDPRESS developers uses admin-ajax.php for receiving data from ajax in their plugin .
But also it is possible to add query vars or receiving posted data directly in main plugin file , and then saving that in a global variable.
This way we can receive posted data in an easier way. but is it safe ? and why all uses admin-ajax.php in their plugin ?
thanks.
↧
f.n174 on "Which one is better using $_POST directly in plugin file or using admin-ajax.php"
↧