Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
noblogs-wp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai
noblogs-wp
Commits
c3ad75c0
Commit
c3ad75c0
authored
7 years ago
by
lucha
Browse files
Options
Downloads
Patches
Plain Diff
[auto] mu-plugin: disable-emojis
parent
2dbd5981
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wp-content/mu-plugins/disable-emojis.php
+10
-4
10 additions, 4 deletions
wp-content/mu-plugins/disable-emojis.php
with
10 additions
and
4 deletions
wp-content/mu-plugins/disable-emojis.php
+
10
−
4
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment