Skip to content

Commit 025595f

Browse files
feat: (perfmatters) add fonts settings to defaults (#2370)
* feat(perfmatters): add fonts settings to defaults * fix: correct typo and set a required option --------- Co-authored-by: Leo Germani <leogermani@automattic.com>
1 parent 5868143 commit 025595f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

includes/plugins/class-perfmatters.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,14 @@ public static function set_defaults( $options = [] ) {
213213
$options['lazyload']['youtube_preview_thumbnails'] = true;
214214
$options['lazyload']['image_dimensions'] = true;
215215

216+
// Fonts.
217+
if ( ! isset( $options['fonts'] ) ) {
218+
$options['fonts'] = [];
219+
}
220+
$options['fonts']['disable_google_fonts'] = false;
221+
$options['fonts']['display_swap'] = true;
222+
$options['fonts']['local_google_fonts'] = true;
223+
216224
return $options;
217225
}
218226

0 commit comments

Comments
 (0)