Skip to content

Commit 114b8a6

Browse files
committed
Fix Google Fonts breaking in certain cases
1 parent eb5a116 commit 114b8a6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

inc/css/class-block-frontend.php

+3
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ public function get_fonts( $fonts_list = array() ) {
170170
$font['fontvariant'][ $key ] = 400;
171171
}
172172
}
173+
174+
sort( $font['fontvariant'] );
175+
173176
$item .= ':wght@' . implode( ';', $font['fontvariant'] );
174177
}
175178
array_push( $fonts, $item );

plugins/otter-pro/inc/plugins/class-fonts-module.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Fonts_Module {
2626
*/
2727
public function init() {
2828
if ( License::has_active_license() ) {
29-
if ( true === boolval( get_option( 'otter_offload_fonts', true ) ) ) {
29+
if ( true === boolval( get_option( 'otter_offload_fonts', false ) ) ) {
3030
add_filter( 'otter_blocks_google_fonts_url', array( $this, 'register_webfont_loader' ) );
3131
}
3232

0 commit comments

Comments
 (0)