apply_filters( 'wp_preload_resources', array $preload_resources )

Filters domains and URLs for resource preloads.


Parameters

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

Top ↑

Source

File: wp-includes/general-template.php. View all references

$preload_resources = apply_filters( 'wp_preload_resources', array() );


Top ↑

Changelog

Changelog
Version Description
6.1.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.