On this page
apply_filters( 'wp_preload_resources', array $preload_resources )
Filters domains and URLs for resource preloads.
Parameters
$preload_resourcesarray-
Array of resources and their attributes, or URLs to print for resource preloads.
...$0arrayArray of resource attributes.hrefstringURL to include in resource preloads. Required.asstringHow the browser should treat the resource (script,style,image,document, etc).crossoriginstringIndicates the CORS policy of the specified resource.typestringType of the resource (text/html,text/css, etc).mediastringAccepts media types or media queries. Allows responsive preloading.imagesizesstringResponsive source size to the source Set.imagesrcsetstringResponsive image sources to the source set.
Source
File:
wp-includes/general-template.php. View all references$preload_resources = apply_filters( 'wp_preload_resources', array() );Related
Used By
Used By Description wp_preload_resources() wp-includes/general-template.php Prints resource preloads directives to browsers.
Changelog
Version Description 6.1.0 Introduced.
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_preload_resources