[wp-trac] [WordPress Trac] #37694: Can't disable dns-prefetch to s.w.org

WordPress Trac noreply at wordpress.org
Wed Aug 17 14:40:34 UTC 2016


#37694: Can't disable dns-prefetch to s.w.org
---------------------------+-----------------------------
 Reporter:  superpoincare  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  General        |    Version:  4.6
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 According to the ticket 34292, dns-prefetch to s.w.org can be disabled
 with the following code (modified with the actual function):


 {{{
 function trac34292_example_resource_hints( $hints, $relation_type ) {
     if ( 'dns-prefetch' === $relation_type ) {
         return array_diff( $hints, wp_dependencies_unique_hosts() );
     }

     return $hints;
 }

 add_filter( 'wp_resource_hints', 'trac34292_example_resource_hints', 10, 2
 );
 }}}

 However this doesn't work. I still see the dns-prefetch in HTML.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37694>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list