Changeset 38122
- Timestamp:
- 07/20/2016 06:18:30 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r38121 r38122 2803 2803 $hints = array( 2804 2804 'dns-prefetch' => wp_dependencies_unique_hosts(), 2805 'preconnect' => array( 's.w.org'),2805 'preconnect' => array(), 2806 2806 'prefetch' => array(), 2807 2807 'prerender' => array(), 2808 2808 ); 2809 2810 /* 2811 * Add DNS prefetch for the Emoji CDN. 2812 * The path is removed in the foreach loop below. 2813 */ 2814 /** This filter is documented in wp-includes/formatting.php */ 2815 $hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' ); 2809 2816 2810 2817 foreach ( $hints as $relation_type => $urls ) { -
trunk/tests/phpunit/tests/general/resourceHints.php
r38100 r38122 32 32 33 33 function test_should_have_defaults_on_frontend() { 34 $expected = "<link rel=' preconnect' href='http://s.w.org'>\n";34 $expected = "<link rel='dns-prefetch' href='//s.w.org'>\n"; 35 35 36 36 $this->expectOutputString( $expected ); … … 40 40 41 41 function test_dns_prefetching() { 42 $expected = "<link rel='dns-prefetch' href='//wordpress.org'>\n" . 42 $expected = "<link rel='dns-prefetch' href='//s.w.org'>\n" . 43 "<link rel='dns-prefetch' href='//wordpress.org'>\n" . 43 44 "<link rel='dns-prefetch' href='//google.com'>\n" . 44 "<link rel='dns-prefetch' href='//make.wordpress.org'>\n" . 45 "<link rel='preconnect' href='http://s.w.org'>\n"; 45 "<link rel='dns-prefetch' href='//make.wordpress.org'>\n"; 46 46 47 47 add_filter( 'wp_resource_hints', array( $this, '_add_dns_prefetch_domains' ), 10, 2 ); … … 68 68 69 69 function test_prerender() { 70 $expected = "<link rel=' preconnect' href='http://s.w.org'>\n" .70 $expected = "<link rel='dns-prefetch' href='//s.w.org'>\n" . 71 71 "<link rel='prerender' href='https://make.wordpress.org/great-again'>\n" . 72 72 "<link rel='prerender' href='http://jobs.wordpress.net'>\n" . … … 94 94 95 95 function test_parse_url_dns_prefetch() { 96 $expected = "<link rel='dns-prefetch' href='// make.wordpress.org'>\n" .97 "<link rel=' preconnect' href='http://s.w.org'>\n";96 $expected = "<link rel='dns-prefetch' href='//s.w.org'>\n" . 97 "<link rel='dns-prefetch' href='//make.wordpress.org'>\n"; 98 98 99 99 add_filter( 'wp_resource_hints', array( $this, '_add_dns_prefetch_long_urls' ), 10, 2 ); … … 116 116 function test_dns_prefetch_styles() { 117 117 $expected = "<link rel='dns-prefetch' href='//fonts.googleapis.com'>\n" . 118 "<link rel=' preconnect' href='http://s.w.org'>\n";118 "<link rel='dns-prefetch' href='//s.w.org'>\n"; 119 119 120 120 $args = array( … … 135 135 function test_dns_prefetch_scripts() { 136 136 $expected = "<link rel='dns-prefetch' href='//fonts.googleapis.com'>\n" . 137 "<link rel=' preconnect' href='http://s.w.org'>\n";137 "<link rel='dns-prefetch' href='//s.w.org'>\n"; 138 138 139 139 $args = array( … … 152 152 153 153 function test_dns_prefetch_scripts_does_not_included_registered_only() { 154 $expected = "<link rel=' preconnect' href='http://s.w.org'>\n";154 $expected = "<link rel='dns-prefetch' href='//s.w.org'>\n"; 155 155 $unexpected = "<link rel='dns-prefetch' href='//wordpress.org'>\n"; 156 156
Note: See TracChangeset
for help on using the changeset viewer.