Skip to content
Snippets Groups Projects
Commit c3ad75c0 authored by lucha's avatar lucha
Browse files

[auto] mu-plugin: disable-emojis

parent 2dbd5981
Branches
Tags
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment