You appear to be a bot. Output may be restricted
Description
Add preconnect for Google Fonts.
Usage
$array = twentyfifteen_resource_hints( $urls, $relation_type );
Parameters
- $urls
- ( array ) required – URLs to print for resource hints.
- $relation_type
- ( string ) required – The relation type the URLs are printed.
Returns
array URLs to print for resource hints.
Source
File name: twentyfifteen/functions.php
Lines:
1 to 14 of 14
function twentyfifteen_resource_hints( $urls, $relation_type ) { if ( wp_style_is( 'twentyfifteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) { if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { $urls[] = array( 'href' => 'https://fonts.gstatic.com', 'crossorigin', ); } else { $urls[] = 'https://fonts.gstatic.com'; } } return $urls; }