admin管理员组文章数量:1130349
I created custom theme in Wordpress and wanted to apply it to my site. Apparently, in the header section, besides the elements, weird text about emoji appeared. I found out that I have to turn out the emoji using "Disable Emojis" plugin or put some code right into functions.php.
I have used this code and it worked:
function disable_emojis() {
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_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' );
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 );
}
add_action( 'init', 'disable_emojis' );
It helped, text dissapeared but also all of my styling. Which means, that If I turn off the emojis, my style.css is not applied.
How to solve it ?
I created custom theme in Wordpress and wanted to apply it to my site. Apparently, in the header section, besides the elements, weird text about emoji appeared. I found out that I have to turn out the emoji using "Disable Emojis" plugin or put some code right into functions.php.
I have used this code and it worked:
function disable_emojis() {
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_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' );
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 );
}
add_action( 'init', 'disable_emojis' );
It helped, text dissapeared but also all of my styling. Which means, that If I turn off the emojis, my style.css is not applied.
How to solve it ?
本文标签: functionsCSS disabled after getting rid of emoji
版权声明:本文标题:functions - CSS disabled after getting rid of emoji 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749149316a2323539.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论