Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
noblogs-wp
Commits
c3ad75c0
Commit
c3ad75c0
authored
Oct 17, 2017
by
lucha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[auto] mu-plugin: disable-emojis
parent
2dbd5981
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
wp-content/mu-plugins/disable-emojis.php
wp-content/mu-plugins/disable-emojis.php
+10
-4
No files found.
wp-content/mu-plugins/disable-emojis.php
View file @
c3ad75c0
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment