Which one is better using $_POST directly in plugin file or using admin-ajax.php
-
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.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Which one is better using $_POST directly in plugin file or using admin-ajax.php’ is closed to new replies.