Disable the WP emoji polyfill
authorjond@apple.com <jond@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2019 00:55:08 +0000 (00:55 +0000)
committerjond@apple.com <jond@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2019 00:55:08 +0000 (00:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194394

Reviewed by Devin Rousso.

* wp-content/themes/webkit/functions.php:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241174 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/webkit.org/ChangeLog
Websites/webkit.org/wp-content/themes/webkit/functions.php

index 747c2a8..996ceb3 100644 (file)
@@ -1,5 +1,14 @@
 2019-02-07  Jon Davis  <jond@apple.com>
 
+        Disable the WP emoji polyfill
+        https://bugs.webkit.org/show_bug.cgi?id=194394
+
+        Reviewed by Devin Rousso.
+
+        * wp-content/themes/webkit/functions.php:
+
+2019-02-07  Jon Davis  <jond@apple.com>
+
         Fixed responsive design issues for the Contribute drop-down menu and pagination
         https://bugs.webkit.org/show_bug.cgi?id=194393
 
index b10e7f9..3d249c4 100644 (file)
@@ -10,7 +10,18 @@ add_action( 'init', function () {
     register_nav_menu('feature-subnav', __( 'Feature Page Buttons' ));
 } );
 
-//add_action( 'wp_header', 'include_invert_lightness_filter');
+// Disable WP-emoji polyfill
+add_action('init', function() {
+    remove_action('wp_head', 'print_emoji_detection_script', 7);
+    remove_action('admin_print_scripts', 'print_emoji_detection_script');
+    remove_action('admin_print_styles', 'print_emoji_styles');
+    remove_action('wp_print_styles', 'print_emoji_styles');
+    remove_filter('the_content_feed', 'wp_staticize_emoji');
+    remove_filter('comment_text_rss', 'wp_staticize_emoji');
+    remove_filter('wp_mail', 'wp_staticize_emoji_for_email');
+    // Remove DNS prefetch
+    add_filter('emoji_svg_url', '__return_false');
+});
 
 add_action( 'wp_dashboard_setup', function () {
     $SurveyWidget = new WebKit_Nightly_Survey();