Skip to content
Snippets Groups Projects
Commit 30202b08 authored by ale's avatar ale
Browse files

Fixed twentythirteen google fonts patch

parent 2c6ce89f
No related branches found
No related tags found
No related merge requests found
......@@ -3,62 +3,43 @@ index 596b5dc02..60c93029d 100644
--- a/wp-content/themes/twentythirteen/functions.php
+++ b/wp-content/themes/twentythirteen/functions.php
@@ -221,15 +221,15 @@ add_action( 'after_setup_theme', 'twentythirteen_setup' );
function twentythirteen_fonts_url() {
$fonts_url = '';
function twentythirteen_fonts_url() {
$fonts_url = '';
- /*
- * translators: If there are characters in your language that are not supported
- * by Source Sans Pro, translate this to 'off'. Do not translate into your own language.
+ /* Translators: If there are characters in your language that are not
+ * supported by Source Sans Pro, translate this to 'off'. Do not translate
+ * into your own language.
*/
$source_sans_pro = _x( 'on', 'Source Sans Pro font: on or off', 'twentythirteen' );
*/
$source_sans_pro = _x( 'on', 'Source Sans Pro font: on or off', 'twentythirteen' );
- /*
- * translators: If there are characters in your language that are not supported
- * by Bitter, translate this to 'off'. Do not translate into your own language.
+ /* Translators: If there are characters in your language that are not
+ * supported by Bitter, translate this to 'off'. Do not translate into your
+ * own language.
*/
$bitter = _x( 'on', 'Bitter font: on or off', 'twentythirteen' );
@@ -247,11 +247,12 @@ function twentythirteen_fonts_url() {
$query_args = array(
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
*/
$bitter = _x( 'on', 'Bitter font: on or off', 'twentythirteen' );
@@ -247,9 +247,8 @@
$query_args = array(
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
- 'display' => urlencode( 'fallback' ),
);
);
- $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
+ $fonts_url = add_query_arg( $query_args, '' );
}
+/*AI fix - tolto google font */
+
return $fonts_url;
}
@@ -304,21 +305,8 @@ add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' );
* @param string $relation_type The relation type the URLs are printed.
* @return array URLs to print for resource hints.
*/
-function twentythirteen_resource_hints( $urls, $relation_type ) {
- if ( wp_style_is( 'twentythirteen-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;
-}
+ $fonts_url = add_query_arg( $query_args, '' );
}
return $fonts_url;
@@ -318,7 +318,6 @@
return $urls;
}
-add_filter( 'wp_resource_hints', 'twentythirteen_resource_hints', 10, 2 );
+ /* AI fix google fonts */
/**
* Enqueue styles for the block-based editor.
/**
* Enqueue styles for the block-based editor.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment