diff --git a/wp-content/mu-plugins/disable-emojis.php b/wp-content/mu-plugins/disable-emojis.php index 4260a7814e9aecb0fba71a7afcacc2b69434b000..5e7a52fd9c6db1bf4eac0a8aaa2ce0a6873e5a7b 100644 --- a/wp-content/mu-plugins/disable-emojis.php +++ b/wp-content/mu-plugins/disable-emojis.php @@ -3,7 +3,7 @@ Plugin Name: Disable Emojis Plugin URI: https://geek.hellyer.kiwi/plugins/disable-emojis/ Description: Disable Emojis -Version: 1.5.3 +Version: 1.7 Author: Ryan Hellyer Author URI: https://geek.hellyer.kiwi/ License: GPL2 @@ -66,11 +66,17 @@ function disable_emojis_tinymce( $plugins ) { * @return array Difference betwen the two arrays. */ function disable_emojis_remove_dns_prefetch( $urls, $relation_type ) { + if ( 'dns-prefetch' == $relation_type ) { - /** This filter is documented in wp-includes/formatting.php */ - $emoji_svg_url = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2.2.1/svg/' ); - $urls = array_diff( $urls, array( $emoji_svg_url ) ); + // Strip out any URLs referencing the WordPress.org emoji location + $emoji_svg_url_bit = 'https://s.w.org/images/core/emoji/'; + foreach ( $urls as $key => $url ) { + if ( strpos( $url, $emoji_svg_url_bit ) !== false ) { + unset( $urls[$key] ); + } + } + } return $urls;