Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_resource_hints

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3203
3204           /**
3205            * Filters domains and URLs for resource hints of relation type.
3206            *
3207            * @since 4.6.0
3208            *
3209            * @param array  $urls          URLs to print for resource hints.
3210            * @param string $relation_type The relation type the URLs are printed for, e.g. 'preconnect' or 'prerender'.
3211            */
3212           $urls = apply_filters( 'wp_resource_hints', $urls, $relation_type );
3213
3214           foreach ( $urls as $key => $url ) {
3215                $atts = array();
3216
3217                if ( is_array( $url ) ) {
3218                     if ( isset( $url['href'] ) ) {
3219                          $atts = $url;
3220                          $url  = $url['href'];
3221                     } else {