admin管理员组文章数量:1395137
Typically, people do ajax calls like:
add_action( 'wp_ajax_ACTIONNAME', [$this, 'callback_Function'] );
However, I am interested, what are key differences (other than having authorization checks & wp_ajax_nopriv_
) from doing the AJAX $_POST
checks within:
add_action( 'init', [$this, 'callback_Function'], 1 ); // I know, priority with 10 might make it slower
public function callback_Function()
{
if(!empty($_POST['action']=="ACTIONNAME"))
....
}
my main interest here is if there is any significant speed/performance difference?
本文标签: SpeedPerformance difference between wpajax and init checks for AJAXPOST requests
版权声明:本文标题:SpeedPerformance difference between `wp_ajax` and `init` checks for AJAXPOST requests? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744624021a2616205.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论