diff --git src/wp-content/themes/twentyfifteen/functions.php src/wp-content/themes/twentyfifteen/functions.php
index 1c382bf..8ae7e1d 100644
|
|
|
function twentyfifteen_scripts() { |
| 286 | 286 | add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' ); |
| 287 | 287 | |
| 288 | 288 | /** |
| | 289 | * Add preconnect for Google Fonts. |
| | 290 | * |
| | 291 | * @since Twenty Fifteen 1.7 |
| | 292 | * |
| | 293 | * @param array $urls URLs to print for resource hints. |
| | 294 | * @param string $relation_type The relation type the URLs are printed. |
| | 295 | * @return array URLs to print for resource hints. |
| | 296 | */ |
| | 297 | function twentyfifteen_resource_hints( $urls, $relation_type ) { |
| | 298 | if ( wp_style_is( 'twentyfifteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) { |
| | 299 | if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { |
| | 300 | $urls[] = array( |
| | 301 | 'href' => 'https://fonts.gstatic.com', |
| | 302 | 'crossorigin', |
| | 303 | ); |
| | 304 | } else { |
| | 305 | $urls[] = 'https://fonts.gstatic.com'; |
| | 306 | } |
| | 307 | } |
| | 308 | |
| | 309 | return $urls; |
| | 310 | } |
| | 311 | add_filter( 'wp_resource_hints', 'twentyfifteen_resource_hints', 10, 2 ); |
| | 312 | |
| | 313 | /** |
| 289 | 314 | * Add featured image as background image to post navigation elements. |
| 290 | 315 | * |
| 291 | 316 | * @since Twenty Fifteen 1.0 |
diff --git src/wp-content/themes/twentyfourteen/functions.php src/wp-content/themes/twentyfourteen/functions.php
index f85ef1c..74141dc 100644
|
|
|
function twentyfourteen_admin_fonts() { |
| 277 | 277 | } |
| 278 | 278 | add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' ); |
| 279 | 279 | |
| | 280 | /** |
| | 281 | * Add preconnect for Google Fonts. |
| | 282 | * |
| | 283 | * @since Twenty Fourteen 1.9 |
| | 284 | * |
| | 285 | * @param array $urls URLs to print for resource hints. |
| | 286 | * @param string $relation_type The relation type the URLs are printed. |
| | 287 | * @return array URLs to print for resource hints. |
| | 288 | */ |
| | 289 | function twentyfourteen_resource_hints( $urls, $relation_type ) { |
| | 290 | if ( wp_style_is( 'twentyfourteen-lato', 'queue' ) && 'preconnect' === $relation_type ) { |
| | 291 | if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { |
| | 292 | $urls[] = array( |
| | 293 | 'href' => 'https://fonts.gstatic.com', |
| | 294 | 'crossorigin', |
| | 295 | ); |
| | 296 | } else { |
| | 297 | $urls[] = 'https://fonts.gstatic.com'; |
| | 298 | } |
| | 299 | } |
| | 300 | |
| | 301 | return $urls; |
| | 302 | } |
| | 303 | add_filter( 'wp_resource_hints', 'twentyfourteen_resource_hints', 10, 2 ); |
| | 304 | |
| 280 | 305 | if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) : |
| 281 | 306 | /** |
| 282 | 307 | * Print the attached image with a link to the next attached image. |
diff --git src/wp-content/themes/twentythirteen/functions.php src/wp-content/themes/twentythirteen/functions.php
index ae1bd9e..d1f7d5b 100644
|
|
|
function twentythirteen_scripts_styles() { |
| 191 | 191 | add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' ); |
| 192 | 192 | |
| 193 | 193 | /** |
| | 194 | * Add preconnect for Google Fonts. |
| | 195 | * |
| | 196 | * @since Twenty Thirteen 2.1 |
| | 197 | * |
| | 198 | * @param array $urls URLs to print for resource hints. |
| | 199 | * @param string $relation_type The relation type the URLs are printed. |
| | 200 | * @return array URLs to print for resource hints. |
| | 201 | */ |
| | 202 | function twentythirteen_resource_hints( $urls, $relation_type ) { |
| | 203 | if ( wp_style_is( 'twentythirteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) { |
| | 204 | if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { |
| | 205 | $urls[] = array( |
| | 206 | 'href' => 'https://fonts.gstatic.com', |
| | 207 | 'crossorigin', |
| | 208 | ); |
| | 209 | } else { |
| | 210 | $urls[] = 'https://fonts.gstatic.com'; |
| | 211 | } |
| | 212 | } |
| | 213 | |
| | 214 | return $urls; |
| | 215 | } |
| | 216 | add_filter( 'wp_resource_hints', 'twentythirteen_resource_hints', 10, 2 ); |
| | 217 | |
| | 218 | /** |
| 194 | 219 | * Filter the page title. |
| 195 | 220 | * |
| 196 | 221 | * Creates a nicely formatted and more specific title element text for output |
diff --git src/wp-content/themes/twentytwelve/functions.php src/wp-content/themes/twentytwelve/functions.php
index 56cd8e5..2dc2cd8 100644
|
|
|
function twentytwelve_scripts_styles() { |
| 158 | 158 | add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); |
| 159 | 159 | |
| 160 | 160 | /** |
| | 161 | * Add preconnect for Google Fonts. |
| | 162 | * |
| | 163 | * @since Twenty Twelve 2.2 |
| | 164 | * |
| | 165 | * @param array $urls URLs to print for resource hints. |
| | 166 | * @param string $relation_type The relation type the URLs are printed. |
| | 167 | * @return array URLs to print for resource hints. |
| | 168 | */ |
| | 169 | function twentytwelve_resource_hints( $urls, $relation_type ) { |
| | 170 | if ( wp_style_is( 'twentytwelve-fonts', 'queue' ) && 'preconnect' === $relation_type ) { |
| | 171 | if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { |
| | 172 | $urls[] = array( |
| | 173 | 'href' => 'https://fonts.gstatic.com', |
| | 174 | 'crossorigin', |
| | 175 | ); |
| | 176 | } else { |
| | 177 | $urls[] = 'https://fonts.gstatic.com'; |
| | 178 | } |
| | 179 | } |
| | 180 | |
| | 181 | return $urls; |
| | 182 | } |
| | 183 | add_filter( 'wp_resource_hints', 'twentytwelve_resource_hints', 10, 2 ); |
| | 184 | |
| | 185 | /** |
| 161 | 186 | * Filter TinyMCE CSS path to include Google Fonts. |
| 162 | 187 | * |
| 163 | 188 | * Adds additional stylesheets to the TinyMCE editor if needed. |