Version Description
- Improved documentation.
- Removed redundant dns prefetching. Thanks to Milan Dinic for the pull request.
Download this release
Release Info
Developer | ryanhellyer |
Plugin | Disable Emojis |
Version | 1.5.2 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.5.2
- disable-emojis.php +19 -1
- readme.txt +9 -4
disable-emojis.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Disable Emojis
|
4 |
Plugin URI: https://geek.hellyer.kiwi/plugins/disable-emojis/
|
5 |
Description: Disable Emojis
|
6 |
-
Version: 1.5.
|
7 |
Author: Ryan Hellyer
|
8 |
Author URI: https://geek.hellyer.kiwi/
|
9 |
License: GPL2
|
@@ -40,6 +40,7 @@ function disable_emojis() {
|
|
40 |
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
|
41 |
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
|
42 |
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
|
|
|
43 |
}
|
44 |
add_action( 'init', 'disable_emojis' );
|
45 |
|
@@ -57,3 +58,20 @@ function disable_emojis_tinymce( $plugins ) {
|
|
57 |
}
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Plugin Name: Disable Emojis
|
4 |
Plugin URI: https://geek.hellyer.kiwi/plugins/disable-emojis/
|
5 |
Description: Disable Emojis
|
6 |
+
Version: 1.5.2
|
7 |
Author: Ryan Hellyer
|
8 |
Author URI: https://geek.hellyer.kiwi/
|
9 |
License: GPL2
|
40 |
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
|
41 |
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
|
42 |
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
|
43 |
+
add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 );
|
44 |
}
|
45 |
add_action( 'init', 'disable_emojis' );
|
46 |
|
58 |
}
|
59 |
}
|
60 |
|
61 |
+
/**
|
62 |
+
* Remove emoji CDN hostname from DNS prefetching hints.
|
63 |
+
*
|
64 |
+
* @param array $urls URLs to print for resource hints.
|
65 |
+
* @param string $relation_type The relation type the URLs are printed for.
|
66 |
+
* @return array Difference betwen the two arrays.
|
67 |
+
*/
|
68 |
+
function disable_emojis_remove_dns_prefetch( $urls, $relation_type ) {
|
69 |
+
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/' );
|
72 |
+
|
73 |
+
$urls = array_diff( $urls, array( $emoji_svg_url ) );
|
74 |
+
}
|
75 |
+
|
76 |
+
return $urls;
|
77 |
+
}
|
readme.txt
CHANGED
@@ -3,20 +3,21 @@ Contributors: ryanhellyer
|
|
3 |
Tags: emojis
|
4 |
Donate link: https://geek.hellyer.kiwi/donate/
|
5 |
Requires at least: 4.2
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.5.
|
8 |
|
9 |
|
10 |
-
This plugin disables the new emoji functionality
|
11 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
This plugin disables the new emoji functionality
|
16 |
|
17 |
|
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.
|
19 |
|
|
|
20 |
== Installation ==
|
21 |
|
22 |
After you've downloaded and extracted the files:
|
@@ -30,6 +31,10 @@ Visit the <a href="https://geek.hellyer.kiwi/plugins/disable-emojis/">Disable Em
|
|
30 |
|
31 |
== Changelog ==
|
32 |
|
|
|
|
|
|
|
|
|
33 |
= 1.5.1 =
|
34 |
* Updating documentation.
|
35 |
|
3 |
Tags: emojis
|
4 |
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
|
8 |
|
9 |
|
10 |
+
This plugin disables the new WordPress emoji functionality.
|
11 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
This plugin disables the new WordPress emoji functionality.
|
16 |
|
17 |
|
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.
|
19 |
|
20 |
+
|
21 |
== Installation ==
|
22 |
|
23 |
After you've downloaded and extracted the files:
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
+
= 1.5.2 =
|
35 |
+
* Improved documentation.
|
36 |
+
* Removed redundant dns prefetching. Thanks to <a href="http://blog.milandinic.com/">Milan Dinic</a> for the pull request.
|
37 |
+
|
38 |
= 1.5.1 =
|
39 |
* Updating documentation.
|
40 |
|