diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
index 3f042865ad..444a2dcddf 100644
--- a/src/wp-includes/general-template.php
+++ b/src/wp-includes/general-template.php
@@ -3317,13 +3317,6 @@ function wp_resource_hints() {
'prerender' => array(),
);
- /*
- * Add DNS prefetch for the Emoji CDN.
- * The path is removed in the foreach loop below.
- */
- /** This filter is documented in wp-includes/formatting.php */
- $hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/13.0.0/svg/' );
-
foreach ( $hints as $relation_type => $urls ) {
$unique_urls = array();
diff --git a/tests/phpunit/tests/general/wpResourceHints.php b/tests/phpunit/tests/general/wpResourceHints.php
index 1761196b2c..03a4c024e0 100644
--- a/tests/phpunit/tests/general/wpResourceHints.php
+++ b/tests/phpunit/tests/general/wpResourceHints.php
@@ -30,17 +30,8 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase {
parent::tear_down();
}
- public function test_should_have_defaults_on_frontend() {
- $expected = "\n";
-
- $this->expectOutputString( $expected );
-
- wp_resource_hints();
- }
-
public function test_dns_prefetching() {
- $expected = "\n" .
- "\n" .
+ $expected = "\n" .
"\n" .
"\n";
@@ -70,8 +61,7 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase {
* @ticket 37652
*/
public function test_preconnect() {
- $expected = "\n" .
- "\n" .
+ $expected = "\n" .
"\n" .
"\n" .
"\n";
@@ -98,8 +88,7 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase {
}
public function test_prerender() {
- $expected = "\n" .
- "\n" .
+ $expected = "\n" .
"\n" .
"\n";
@@ -124,8 +113,7 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase {
}
public function test_parse_url_dns_prefetch() {
- $expected = "\n" .
- "\n";
+ $expected = "\n";
add_filter( 'wp_resource_hints', array( $this, 'add_dns_prefetch_long_urls' ), 10, 2 );
@@ -145,8 +133,7 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase {
}
public function test_dns_prefetch_styles() {
- $expected = "\n" .
- "\n";
+ $expected = "\n";
$args = array(
'family' => 'Open+Sans:400',
@@ -164,8 +151,7 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase {
}
public function test_dns_prefetch_scripts() {
- $expected = "\n" .
- "\n";
+ $expected = "\n";
$args = array(
'family' => 'Open+Sans:400',
@@ -185,7 +171,7 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase {
* @ticket 37385
*/
public function test_dns_prefetch_scripts_does_not_include_registered_only() {
- $expected = "\n";
+ $expected = '';
$unexpected = "\n";
wp_register_script( 'jquery-elsewhere', 'https://wordpress.org/wp-includes/js/jquery/jquery.js' );
@@ -202,7 +188,7 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase {
* @ticket 37502
*/
public function test_deregistered_scripts_are_ignored() {
- $expected = "\n";
+ $expected = '';
wp_enqueue_script( 'test-script', 'http://example.org/script.js' );
wp_deregister_script( 'test-script' );
@@ -215,7 +201,7 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase {
* @ticket 37652
*/
public function test_malformed_urls() {
- $expected = "\n";
+ $expected = '';
// Errant colon.
add_filter( 'wp_resource_hints', array( $this, 'add_malformed_url_errant_colon' ), 10, 2 );
@@ -250,8 +236,7 @@ class Tests_General_wpResourceHints extends WP_UnitTestCase {
* @ticket 38121
*/
public function test_custom_attributes() {
- $expected = "\n" .
- "\n" .
+ $expected = "\n" .
"\n" .
"\n" .
"\n";