Genesis Themes

  • Home
  • Genesis Tutorials
  • WP Tutorial
  • Twenty Fifteen Theme
  • Social Media
  • WP Plugins

How to Disable Emojicons in WordPress 4.2

Emojicons introduced in WordPress 4.2 version, to check out the actions and filters code used, open this file /wp-includes/default-filters.php and search for emoji.If you want to remove or disable emoji code, Then you will have to go through each of these and remove them in your own code by using the functions remove_filter and remove_action.

wordpress-emojicons

WordPress 4.2 version added emojicons, which are really unnecessary, if you are not using the emojis or cool smilies. More over these Emojicons will slow down your WordPress page speed by adding the JavaScript to your each page and post. By defaultĀ emojicons CSSĀ and JavaScript enqueued in the header of your WordPress theme, which is unnecessary ,when you are not using emojicons.

function pw_remove_emojicons() 
{
    // Remove from comment feed and RSS
    remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
    remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );

    // Remove from emails
    remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );

    // Remove from head tag
    remove_action( 'wp_head', 'print_emoji_detection_script', 7 );

    // Remove from print related styling
    remove_action( 'wp_print_styles', 'print_emoji_styles' );

    // Remove from admin area
    remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
    remove_action( 'admin_print_styles', 'print_emoji_styles' );
}
add_action( 'init', 'pw_remove_emojicons' );

Alternately, you can use Disable Emojis WordPress plugin to completely remove/disable emojis. This plugin disables the new emoji functionality in WordPress 4.2 version.

Related Posts

  • Setting Up WordPress Breadcrumbs with Yoast SEO Plugin
  • Specify a Vary: Accept-Encoding header in WordPress
  • Related Posts by Category in WordPress without Plugin
  • How to Inline Small JavaScript Files
  • How to Avoid CSS @Import in any WordPress Child Theme
  • How to Remove Website Field from WordPress Comments
  • Best Way to Defer Parsing of JavaScript in WordPress
  • Resources to Minify CSS in WordPress
  • How to Add Related Posts with Thumbnails in WordPress
  • How to Combine External JavaScript files in WordPress

Bluehost and Siteground Coupons for January 2016.

Best Premium WordPress Themes from TemplateMonster
download wordpress themes from MonsterOne

Categories

  • Blog
  • Blogger
  • Genesis Tutorials
  • Social Media
  • Top Websites
  • Twenty Fifteen WordPress Theme
  • WordPress Plugins
  • WordPress Tutorial