diff --git a/patches/themes/twentythirteen-google-fonts.patch b/patches/themes/twentythirteen-google-fonts.patch index f62945bf124350af3cc58ed5f6568ee61be44faa..fcaabb3008f75cc6b164e04ff753f345e6f587ec 100644 --- a/patches/themes/twentythirteen-google-fonts.patch +++ b/patches/themes/twentythirteen-google-fonts.patch @@ -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.