Do you want to disable emojis on your WordPress website?
The use of Emojis is very common these days as it is being used Worldwide on all types of devices, websites, and other digital content.
However, many website owners, business owners, and content creators do not use emojis on their business sites. But WordPress still loads the scripts and styles on your website’s front-end and back-end admin area even if you are not using them.
Loading them increases the server load unnecessarily. Therefore, stopping them from loading is the best way not only to reduce the server load but also to optimize your website for a better user experience.
The below code disables the emoji scripts and styles from the front-end area.
/**
* Remove Emojis Styles and Scripts From the Front-end.
*/
remove_action( 'wp_head', 'print_emoji_detection_script', 10 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
and the back-end admin area.
/**
* Remove Emojis Styles and Scripts For Back-end Admin Area.
*/
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );