wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_resource_hints › Filtr WordPress Hooks

Od4.7.0
Przestarzałyn/a
apply_filters( 'wp_resource_hints', $urls, $relation_type )
Parametry: (2)
  • (array) $urls { Array of resources and their attributes, or URLs to print for resource hints. @type array|string ...$0 { Array of resource attributes, or a URL string. @type string $href URL to include in resource hints. Required. @type string $as How the browser should treat the resource (`script`, `style`, `image`, `document`, etc). @type string $crossorigin Indicates the CORS policy of the specified resource. @type float $pr Expected probability that the resource hint will be used. @type string $type Type of the resource (`text/html`, `text/css`, etc). } }
    Wymagane: Tak
  • (string) $relation_type The relation type the URLs are printed for. One of 'dns-prefetch', 'preconnect', 'prefetch', or 'prerender'.
    Wymagane: Tak
Zdefiniowane na:
Codex:

Filters domains and URLs for resource hints of the given relation type.





Źródło

$urls = apply_filters( 'wp_resource_hints', $urls, $relation_type );