apply_filters( 'wp_preload_resources', array $preload_resources )

Filters domains and URLs for resource preloads.


Parameters

$preload_resources

Array of resources and their attributes, or URLs to print for resource preloads.<br>

  • '...$0'
    (array) Array of resource attributes.<br>
    • 'href'
      (string) URL to include in resource preloads. Required.<br>
    • 'as'
      (string) How the browser should treat the resource (script, style, image, document, etc).<br>
    • 'crossorigin'
      (string) Indicates the CORS policy of the specified resource.<br>
    • 'type'
      (string) Type of the resource (text/html, text/css, etc).<br>
    • 'media'
      (string) Accepts media types or media queries. Allows responsive preloading.<br>
    • 'imagesizes'
      (string) Responsive source size to the source Set.<br>
    • 'imagesrcset'
      (string) Responsive image sources to the source set.<br>


Source

File: wp-includes/general-template.php

View on GitHub



Changelog

Changelog
Version Description
6.1.0 Introduced.