[wp-trac] [WordPress Trac] #38121: Crossorigin and other attributes for wp_resource_hints

WordPress Trac noreply at wordpress.org
Sun Sep 25 23:57:57 UTC 2016


#38121: Crossorigin and other attributes for wp_resource_hints
---------------------------+------------------------------
 Reporter:  superpoincare  |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:  4.6
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  performance
---------------------------+------------------------------

Comment (by peterwilsoncc):

 Replying to [comment:2 swissspidy]:
 > Of course, this all would need to be done in a backward compatible way.

 A couple of possibilities, each attribute can be a string (URL only) or
 one of the following:

 {{{
 'example.com' => array(
   'cross-origin' => 'user-credentials',
   'other' => 'atts'
 ),
 }}}

 or

 {{{
 array(
   'href' => 'example.com',  //alias with url
   'cross-origin' => 'user-credentials',
   'other' => 'atts'
 ),
 }}}

 an `is_array` check is used to determine if the additional attributes
 exist.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38121#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list