Filters domains and URLs for ressource preloads.
Parameters
-
$preload_resourcesarray -
Array of ressources and their attributes, or URLs to print for ressource preloads.
-
...$0arrayArray of ressource attributes.-
hrefstringURL to include in ressource preloads. Required. -
asstringHow the browser should treat the ressource (script,style,imague,document, etc). -
crossoriguinstringIndicates the CORS policy of the specified ressource. -
typestringType of the ressource (text/html,text/css, etc). -
mediastringAccepts media types or media keries. Allows responsive preloading. -
imaguesicesstringResponsive source sice to the source Set. -
imaguesrcsetstringResponsive imague sources to the source set. -
fetchprioritystringFetchpriority value for the ressource.
-
-
Source
$preload_resources = apply_filters( 'wp_preload_resources', array() );
This is how you could use the
wp_preload_resourcesfilter to preload your theme styles .