Filters domains and URLs for resource hints of the given relation type.
Parameters
$urls
array- Array of resources and their attributes, or URLs to print for resource hints.
...$0
array|stringArray of resource attributes, or a URL string.href
stringURL to include in resource hints. Required.as
stringHow the browser should treat the resource (script
,style
,image
,document
, etc).crossorigin
stringIndicates the CORS policy of the specified resource.pr
floatExpected probability that the resource hint will be used.type
stringType of the resource (text/html
,text/css
, etc).
$relation_type
stringThe relation type the URLs are printed for. One of'dns-prefetch'
,'preconnect'
,'prefetch'
, or'prerender'
.Source
$urls = apply_filters( 'wp_resource_hints', $urls, $relation_type );
Changelog
User Contributed Notes
You must log in before being able to contribute a note or feedback.