阿贾克斯是在Word preSS [英] Is Ajax in WordPress
本文介绍了阿贾克斯是在Word preSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
反正有检测,如果当前的服务器操作是目前在Word preSS AJAX请求?
例如:
is_ajax()
解决方案
如果您正在使用AJAX 推荐在codeX ,那么你就可以测试 DOING_AJAX
恒:
如果(定义(DOING_AJAX)及和放大器; DOING_AJAX){/ *这是一个AJAX调用* /}
Is there anyway to detect if the current server operation is currently an AJAX request in WordPress?
For example:
is_ajax()
解决方案
If you're using AJAX as recommended in the codex, then you can test for the DOING_AJAX
constant:
if (defined('DOING_AJAX') && DOING_AJAX) { /* it's an AJAX call */ }
这篇关于阿贾克斯是在Word preSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文