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.fetchprioritystringFetchpriority value for the resource.
Source
$preload_resources = apply_filters( 'wp_preload_resources', array() );Changelog
User Contributed Notes
You must log in before being able to contribute a note or feedback.
This is how you could use the
wp_preload_resourcesfilter to preload your theme styles.