Remove WordPress Emoji:
WordPress 4.2 added emoji support, that means some extra CSS and JS loaded by default to display Emoji. To remove Emoji script in WordPress, install Ryan Hellyer’s Disable Emojis plugin or play with the following code without using WordPress plugin.The main disadvantage of using emoticons in WordPress is negative impact on site load time.
You can easily remove WordPress Emoji script and style, which added in the latest WordPress 4.2 by adding the following code to your current theme's functions.php file.
// Remove emoji support.
function myg_remove_emoji() {
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
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' );
// Remove from TinyMCE
add_filter( 'tiny_mce_plugins', 'myg_remove_tinymce_emoji' );
}
add_action( 'init', 'myg_remove_emoji' );
// Filter out the tinymce emoji plugin.
function myg_remove_tinymce_emoji( $plugins ) {
if ( ! is_array( $plugins ) ) {
return array();
}
return array_diff( $plugins, array( 'wpemoji' ) );
}
To check out the actions and filters used in Emoji, open this file /wp-includes/default-filters.php and search for emoji.To remove emoji in WordPress 4.2, we used the functions remove_filter and remove_action