[wp-trac] [WordPress Trac] #52842: No way to adjust attributes in wp_resource_hints()

WordPress Trac noreply at wordpress.org
Thu Apr 29 00:53:11 UTC 2021


#52842: No way to adjust attributes in wp_resource_hints()
--------------------------+------------------------------
 Reporter:  vanyukov      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  minor         |  Resolution:
 Keywords:  needs-patch   |     Focuses:  docs
--------------------------+------------------------------
Changes (by peterwilsoncc):

 * keywords:  needs-patch reporter-feedback => needs-patch
 * focuses:   => docs


Comment:

 Thanks for the reply.

 You're right, the documentation could be improved so this ticket can stay
 open to do that. It looks like the docs weren't updated when the `$url`
 parameter was changed to accept attributes rather than just the URL.

 {{{
 @param array[] Array of resources to be hinted and their attributes {
         @item string $url URL to include in resource hints
         @item string $as  How the browser should treat the asset (CSS,
 JavaScript, etc)
         // etc, etc
 }
 }}}

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


More information about the wp-trac mailing list