Skip to content

Commit 45e59a1

Browse files
committed
All: Update plugins/disable-emojis from 1.5 to 1.7
1 parent ab6506c commit 45e59a1

File tree

4 files changed

+77
-18
lines changed

4 files changed

+77
-18
lines changed

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
"deps": [
1111
"curl -O -q --output-dir themes/jquery/lib/typesense-minibar 'https://raw.githubusercontent.com/jquery/typesense-minibar/1.3.4/{typesense-minibar.css,typesense-minibar.js,LICENSE.txt}'",
1212
"curl -q https://raw.githubusercontent.com/jquery/typesense-minibar/1.3.4/typesense-minibar-foot.css >> themes/jquery/lib/typesense-minibar/typesense-minibar.css",
13-
"curl -O -q --output-dir plugins/memcached 'https://raw.githubusercontent.com/Automattic/wp-memcached/35e1ea16f6b8cb8a1e6fbca124e33a44db21fa74/{object-cache.php,readme.txt,LICENSE}'"
13+
14+
"curl -O -q --output-dir plugins/memcached 'https://raw.githubusercontent.com/Automattic/wp-memcached/35e1ea16f6b8cb8a1e6fbca124e33a44db21fa74/{object-cache.php,readme.txt,LICENSE}'",
15+
16+
"git rm -rf plugins/disable-emojis/",
17+
"curl -s 'https://downloads.wordpress.org/plugin/disable-emojis.1.7.7.zip' | tar -xv -C plugins/",
18+
"git add plugins/disable-emojis/"
1419
]
1520
}
1621
}

plugins/disable-emojis/composer.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "ryanhellyer/disable-emojiis",
3+
"description": "WordPress plugin which disables the WordPress emoji functionality. GDPR friendly.",
4+
"type": "wordpress-plugin",
5+
"license": "GPL-2.0",
6+
"authors": [
7+
{
8+
"name": "ryanhellyer"
9+
}
10+
],
11+
"require": {}
12+
}

plugins/disable-emojis/disable-emojis.php

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/*
3-
Plugin Name: Disable Emojis
3+
Plugin Name: Disable Emojis (GDPR friendly)
44
Plugin URI: https://geek.hellyer.kiwi/plugins/disable-emojis/
5-
Description: Disable Emojis
6-
Version: 1.5.2
5+
Description: Disable Emojis (GDPR friendly)
6+
Version: 1.7.7
77
Author: Ryan Hellyer
88
Author URI: https://geek.hellyer.kiwi/
99
License: GPL2
@@ -29,7 +29,7 @@
2929

3030

3131
/**
32-
* Disable the emoji's
32+
* Disable the emojis.
3333
*/
3434
function disable_emojis() {
3535
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
@@ -53,9 +53,9 @@ function disable_emojis() {
5353
function disable_emojis_tinymce( $plugins ) {
5454
if ( is_array( $plugins ) ) {
5555
return array_diff( $plugins, array( 'wpemoji' ) );
56-
} else {
57-
return array();
5856
}
57+
58+
return array();
5959
}
6060

6161
/**
@@ -66,11 +66,17 @@ function disable_emojis_tinymce( $plugins ) {
6666
* @return array Difference betwen the two arrays.
6767
*/
6868
function disable_emojis_remove_dns_prefetch( $urls, $relation_type ) {
69+
6970
if ( 'dns-prefetch' == $relation_type ) {
70-
/** This filter is documented in wp-includes/formatting.php */
71-
$emoji_svg_url = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' );
7271

73-
$urls = array_diff( $urls, array( $emoji_svg_url ) );
72+
// Strip out any URLs referencing the WordPress.org emoji location
73+
$emoji_svg_url_bit = 'https://s.w.org/images/core/emoji/';
74+
foreach ( $urls as $key => $url ) {
75+
if ( strpos( $url, $emoji_svg_url_bit ) !== false ) {
76+
unset( $urls[$key] );
77+
}
78+
}
79+
7480
}
7581

7682
return $urls;

plugins/disable-emojis/readme.txt

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
=== Disable Emojis ===
1+
=== Disable Emojis (GDPR friendly) ===
22
Contributors: ryanhellyer
3-
Tags: emojis
3+
Tags: emojis, gdpr, disable
44
Donate link: https://geek.hellyer.kiwi/donate/
5-
Requires at least: 4.2
6-
Tested up to: 4.7
7-
Stable tag: 1.5.2
5+
Requires at least: 4.8
6+
Tested up to: 6.8
7+
Stable tag: 1.7.7
88

99

10-
This plugin disables the new WordPress emoji functionality.
10+
This plugin disables the new WordPress emoji functionality. GDPR friendly.
1111

1212

1313
== Description ==
1414

15-
This plugin disables the new WordPress emoji functionality.
15+
This plugin disables the new WordPress emoji functionality. GDPR friendly.
1616

1717

18-
Note: Emoticons will still work and emoji's will still work in browsers which have built in support for them. This plugin simply removes the extra code bloat used to add support for emoji's in older browswers.
18+
Note: Emoticons will still work and emojis will still work in browsers which have built in support for them. This plugin simply removes the extra code bloat used to add support for emojis in older browsers.
19+
20+
= GDPR compliancy =
21+
22+
This plugin does not do anything to make your site less GDPR compliant. It disables the DNS prefetching of emojis within WordPress, which should ensure improved privacy. To determine if your site is GDPR compliant, please seek legal advice. I have done my best to ensure the plugin is 100% GDPR compliant, but I am not a lawyer so can not guarantee anything ;)
1923

2024

2125
== Installation ==
@@ -31,6 +35,38 @@ Visit the <a href="https://geek.hellyer.kiwi/plugins/disable-emojis/">Disable Em
3135

3236
== Changelog ==
3337

38+
= 1.7.7 =
39+
* Confirmed support for newer WordPress versions.
40+
41+
= 1.7.6 =
42+
* Confirmed support for newer WordPress versions.
43+
44+
= 1.7.5 =
45+
* Added Composer support.
46+
47+
= 1.7.4 =
48+
* Fixing typos.
49+
50+
= 1.7.3 =
51+
* Unneeded version bump to shut the WordPress.org notice up.
52+
53+
= 1.7.2 =
54+
* Subtle improvement to code cleanliness.
55+
* Improved documentation regarding GDPR issues.
56+
57+
= 1.7.1 =
58+
* Added GDPR friendly label on advice from Ipstenu.
59+
60+
= 1.7 =
61+
* Removed DNS prefetch URL again.
62+
* This time using simple string check rather than relying on internal WordPress filters.
63+
64+
= 1.6 =
65+
* Removed DNS prefetch URL. Props to Aaron Queen for assisting with this.
66+
67+
= 1.5.3 =
68+
* Catering to new DNS prefetch URL in version 4.7 of core
69+
3470
= 1.5.2 =
3571
* Improved documentation.
3672
* Removed redundant dns prefetching. Thanks to <a href="http://blog.milandinic.com/">Milan Dinic</a> for the pull request.

0 commit comments

Comments
 (0)