Tutorials WordPress How to Disable the Emoji Code in WordPress

How to Disable the Emoji Code in WordPress

Since version 4.2 release, WordPress natively adds supports Emoji characters. Because if this WordPress loads some extra java scripts and CSS files in the header.

If you don’t use Emoji and want to remove them, just add the following code snippets to your theme functions.php file.

/**
 * Disable the emoji's
 */
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_action( 'init', 'disable_emojis' );
Total
0
Shares
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Laksha
Laksha
4 years ago

Hi Nilan and what about disable emoji plugins??

https://wordpress.org/plugins/disable-emojis-littlebizzy/

StackTips
StackTips
4 years ago
Reply to  Laksha

You can use plug in as well. But i usually avoid too many plugins on my WordPress.

Previous Post
stacktips website design 2016

Stacktips Website Redesigned – Tell Us What You Think

Next Post
Wordpress Tutorials

How to Notify Author with Email after Post Is Published in WordPress

Related Posts
By clicking “Allow All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookie Notice
Allow All
2
0
Would love your thoughts, please comment.x
()
x