From d289a78a3e034ff07d13cdb091394f99602d3744 Mon Sep 17 00:00:00 2001 From: danieltj27 Date: Wed, 24 Apr 2019 21:26:14 +0100 Subject: [PATCH 1/4] Remove emoji scripts from front-end, related to #11 --- functions.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index 64e98a7..56d5f2a 100644 --- a/functions.php +++ b/functions.php @@ -79,6 +79,20 @@ function susty_setup() { 'flex-width' => true, 'flex-height' => true, ) ); + + /** + * Remove core Emoji support. + * + * @link https://wordpress.stackexchange.com/a/185578 + */ + remove_action( 'admin_print_styles', 'print_emoji_styles' ); + remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); + remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); + remove_action( 'wp_print_styles', 'print_emoji_styles' ); + remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); + remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); + remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); + add_filter( 'emoji_svg_url', '__return_false' ); } endif; add_action( 'after_setup_theme', 'susty_setup' ); @@ -134,9 +148,6 @@ function susty_scripts() { require get_template_directory() . '/inc/jetpack.php'; } -remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); -remove_action( 'wp_print_styles', 'print_emoji_styles' ); - function susty_nav_rewrite_rule() { add_rewrite_rule( 'menu', 'index.php?menu=true', 'top' ); } From f06c6b60aaedf8014eeae8bbdc316959aae2df9c Mon Sep 17 00:00:00 2001 From: danieltj27 Date: Wed, 24 Apr 2019 21:40:14 +0100 Subject: [PATCH 2/4] Fix a11y contrast issues with post meta links --- style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/style.css b/style.css index e175593..e8323fa 100644 --- a/style.css +++ b/style.css @@ -911,11 +911,11 @@ article > header > h1, article > header > h2 { } .entry-meta { - color: rgb(179, 179, 179); + color: rgb(91, 91, 91); } .entry-meta a { - color: rgb(179, 179, 179); + color: rgb(91, 91, 91); } .cat-links { From 9278dfaa987884084eb9feae63e83d2cf57a4c89 Mon Sep 17 00:00:00 2001 From: danieltj27 Date: Wed, 24 Apr 2019 21:42:21 +0100 Subject: [PATCH 3/4] Revert "Remove emoji scripts from front-end, related to #11" This reverts commit d289a78a3e034ff07d13cdb091394f99602d3744. --- functions.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/functions.php b/functions.php index 56d5f2a..64e98a7 100644 --- a/functions.php +++ b/functions.php @@ -79,20 +79,6 @@ function susty_setup() { 'flex-width' => true, 'flex-height' => true, ) ); - - /** - * Remove core Emoji support. - * - * @link https://wordpress.stackexchange.com/a/185578 - */ - remove_action( 'admin_print_styles', 'print_emoji_styles' ); - remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); - remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); - remove_action( 'wp_print_styles', 'print_emoji_styles' ); - remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); - remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); - remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); - add_filter( 'emoji_svg_url', '__return_false' ); } endif; add_action( 'after_setup_theme', 'susty_setup' ); @@ -148,6 +134,9 @@ function susty_scripts() { require get_template_directory() . '/inc/jetpack.php'; } +remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); +remove_action( 'wp_print_styles', 'print_emoji_styles' ); + function susty_nav_rewrite_rule() { add_rewrite_rule( 'menu', 'index.php?menu=true', 'top' ); } From e283ff74c7017bf1523e1fb0ca5128ebfaeb3fea Mon Sep 17 00:00:00 2001 From: danieltj27 Date: Wed, 24 Apr 2019 21:45:38 +0100 Subject: [PATCH 4/4] Remove emojis (again) to avoid extra HTTP requests --- functions.php | 14 ++++++++++++++ style.css | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 64e98a7..34dd742 100644 --- a/functions.php +++ b/functions.php @@ -79,6 +79,20 @@ function susty_setup() { 'flex-width' => true, 'flex-height' => true, ) ); + + /** + * Remove core Emoji support. + * + * @link https://wordpress.stackexchange.com/a/185578 + */ + remove_action( 'admin_print_styles', 'print_emoji_styles' ); + remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); + remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); + remove_action( 'wp_print_styles', 'print_emoji_styles' ); + remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); + remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); + remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); + add_filter( 'emoji_svg_url', '__return_false' ); } endif; add_action( 'after_setup_theme', 'susty_setup' ); diff --git a/style.css b/style.css index e8323fa..e175593 100644 --- a/style.css +++ b/style.css @@ -911,11 +911,11 @@ article > header > h1, article > header > h2 { } .entry-meta { - color: rgb(91, 91, 91); + color: rgb(179, 179, 179); } .entry-meta a { - color: rgb(91, 91, 91); + color: rgb(179, 179, 179); } .cat-links {