From e707e37f23dcb6723ba3cea22d45f8f35ef95deb Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Wed, 17 Jan 2024 21:34:24 +0000 Subject: [PATCH] Embeds: Ensure the deprecated function `print_emoji_styles` isn't used Ensure that the proper new function wp_enqueue_emoji_styles is used in embeds. Follow-up to: [56194]. Props peterwilsoncc, bobbingwide, hellofromTonya. Fixes #59892. See: #58775. git-svn-id: https://develop.svn.wordpress.org/trunk@57306 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/default-filters.php | 1 + tests/phpunit/tests/oembed/template.php | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index 9cb447181aefd..7ebc3a1d3bfe1 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -687,6 +687,7 @@ add_action( 'embed_head', 'wp_robots' ); add_action( 'embed_head', 'rel_canonical' ); add_action( 'embed_head', 'locale_stylesheet', 30 ); +add_action( 'enqueue_embed_scripts', 'wp_enqueue_emoji_styles' ); add_action( 'embed_content_meta', 'print_embed_comments_button' ); add_action( 'embed_content_meta', 'print_embed_sharing_button' ); diff --git a/tests/phpunit/tests/oembed/template.php b/tests/phpunit/tests/oembed/template.php index 12092ff66999f..fca6aadd95d3a 100644 --- a/tests/phpunit/tests/oembed/template.php +++ b/tests/phpunit/tests/oembed/template.php @@ -10,8 +10,6 @@ public function set_up() { global $wp_scripts; $wp_scripts = null; - - remove_action( 'wp_print_styles', 'print_emoji_styles' ); } public function tear_down() {