{ Array of resources and their attributes, or URLs to print for resource preloads. @type array ...$0 { Array of resource attributes. @type string $href URL to include in resource preloads. Required. @type string $as How the browser should treat the resource (script, style, image, document, etc). @type string $crossorigin Indicates the CORS policy of the specified resource. @type string $type Type of the resource (text/html, text/css, etc). @type string $media Accepts media types or media queries. Allows responsive preloading. @type string $imagesizes Responsive source size to the source Set. @type string $imagesrcset Responsive image sources to the source set. @type string $fetchpriority Fetchpriority value for the resource. } }
...$0array
Array of resource attributes.
$hrefstring
URL to include in resource preloads. Required.
$asstring
How the browser should treat the resource (script, style, image, document, etc).
$crossoriginstring
Indicates the CORS policy of the specified resource.
$typestring
Type of the resource (text/html, text/css, etc).
$mediastring
Accepts media types or media queries. Allows responsive preloading.
3986* @type string$imagesizes Responsive source size to the source Set.3987* @type string$imagesrcset Responsive image sources to the source set.3988* @type string$fetchpriority Fetchpriority value for the resource.3989*}3990*}3991*/3992$preload_resources=apply_filters('wp_preload_resources',array());39933994if(!is_array($preload_resources)){3995return;3996}39973998$unique_resources=array();
History
Introduced in 6.1.0. Unchanged from 6.7.7 through 7.1.0.