- Timestamp:
- 09/03/2018 12:52:53 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentysixteen/functions.php
r43571 r43606 157 157 158 158 /** 159 * Add preconnect for Google Fonts. 160 * 161 * @since Twenty Sixteen 1.6 162 * 163 * @param array $urls URLs to print for resource hints. 164 * @param string $relation_type The relation type the URLs are printed. 165 * @return array $urls URLs to print for resource hints. 166 */ 167 function twentysixteen_resource_hints( $urls, $relation_type ) { 168 if ( wp_style_is( 'twentysixteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) { 169 $urls[] = array( 170 'href' => 'https://fonts.gstatic.com', 171 'crossorigin', 172 ); 173 } 174 175 return $urls; 176 } 177 add_filter( 'wp_resource_hints', 'twentysixteen_resource_hints', 10, 2 ); 178 179 /** 159 180 * Registers a widget area. 160 181 *
Note: See TracChangeset
for help on using the changeset viewer.