Summery Summery

Retrieves a list of unique hosts of all enqueued scripts and styles.

Syntax Syntax


Return Return

(string[]) A list of unique hosts of enqueued scripts and styles.

Source Source

File: wp-includes/general-template.php

	foreach ( $meta_tags as $meta_tag ) {
		echo "$meta_tag\n";

 * Prints resource hints to browsers for pre-fetching, pre-rendering
 * and pre-connecting to web sites.
 * Gives hints to browsers to prefetch specific pages or render them
 * in the background, to perform DNS lookups or to begin the connection
 * handshake (DNS, TCP, TLS) in the background.
 * These performance improving indicators work by using `<link rel"…">`.
 * @since 4.6.0
function wp_resource_hints() {
	$hints = array(
		'dns-prefetch' => wp_dependencies_unique_hosts(),
		'preconnect'   => array(),
		'prefetch'     => array(),
		'prerender'    => array(),


Changelog Changelog

Version Description
4.6.0 Introduced.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.