
wordpress如何禁掉Heartbeat API方法,下面web建站小编给大家详细介绍一下具体实现代码!
打开主题下functions.php新增以下代码:
//全部禁掉
function wp_stop_heartbeat() {
 wp_deregister_script('heartbeat');
}
add_action('init', 'wp_stop_heartbeat', 1);
//禁掉特定功能
function wp_disable_autosave() {
 wp_deregister_script('autosave');
}
add_action('admin_init', 'wp_disable_autosave');
WordPress版本如何使用str_starts_with和str_ends_with函数
wordpress教程如何输出用于回复评论的隐藏输入html
标签: Heartbeat API, wordpress函数
上面是“wordpress如何禁掉Heartbeat API方法”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_3546.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

 推荐一款 非常适合前端浏览器测试工具——localtunnel
 推荐一款优设网免费可商用字体——优设标题黑体