WordPress禁用Emoji表情提高加载速度

付费节点推荐


免费节点


节点使用教程


WordPress Emoji 的实现方式会调用 http://s.w.org/images/core/emoji/72×72/ 下的图片来渲染 Emoji,而这个地址是国内访问不了的,所以要禁用 WordPress Emoji 功能,提高网站加载速度,在当前wordpress主题的 functions.php 文件中添加如下代码:
[cc lang=”php”]

remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’);
remove_action( ‘admin_print_styles’, ‘print_emoji_styles’);
remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7);
remove_action( ‘wp_print_styles’, ‘print_emoji_styles’);
remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’);
remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’);
remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’);
[/cc]

未经允许不得转载:Bcoder资源网 » WordPress禁用Emoji表情提高加载速度

相关推荐

更多优质资源关注微信公众号: bcoder

bcoder
赞 (0)
分享到:更多 ()

评论 0

评论前必须登录!

登陆 注册