RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts</strong | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.69% (5.89%*) • Home Loan Fixed: 5.39% (6.59%*) • Fixed: 5.39% (6.59%*) • Variable: 5.69% (5.89%*) • Investment IO: 5.69% (6.48%*) • Investment PI: 5.39% (6.59%*)

Disable Emoji in WordPress

WordPress has supported Emoji since version 4.2. The following function will disable Emoji for those that sensibly want nothing to do with them. Interestingly, Emoji support was released as a "trojan horse" to address a critical (database) security vulnerability. If interested in the back-story, check out this video from WordPress developer Andrew Nacin.

Copy and paste the WordPress function into your theme's functions.php file or, if you sensibly have one installed, your custom functions plugin.

1
<?php 
2
/*
3
 Disable Emoji in WordPress
4
 http://www.beliefmedia.com/code/wp-snippets/disable-emoji-wordpress
5
*/
6
 
7
function beliefmedia_disable_emoji() {
8
  remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
9
  remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
10
  remove_action( 'wp_print_styles', 'print_emoji_styles' );
11
  remove_action( 'admin_print_styles', 'print_emoji_styles' );
12
  remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
13
  remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
14
  remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
15
  add_filter( 'tiny_mce_plugins', 'beliefmedia_disable_tinymce_emoji' );
16
}
17
add_action('init', 'beliefmedia_disable_emoji', 1);
18
 
19
/* filter function used to remove the tinymce emoji plugin */
20
function beliefmedia_disable_tinymce_emoji( $plugins ) {
21
  return array_diff( $plugins, array( 'wpemoji' ) );
22
}

■ ■ ■

 
Download our complimentary 650-page guide on marketing for mortgage brokers. We'll show you exactly how we generate billions in volume for our clients.
Finance Guide, Cropped Top and Bottom
  Timezone: 1 · [ CHANGE ]

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment