-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdisable-emoji.php
28 lines (25 loc) · 990 Bytes
/
disable-emoji.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
* Plugin Name: Disable Emoji
* Plugin URI: https://github.com/felixarntz/felixarntz-mu-plugins
* Description: Removes emoji script and related logic.
* Author: Felix Arntz
* Author URI: https://felix-arntz.me
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* Text Domain: felixarntz-mu-plugins
*
* @package felixarntz-mu-plugins
*/
namespace Felix_Arntz\MU_Plugins;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
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( 'emoji_svg_url', '__return_false' );