PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | modules/google-fonts/current/class-jetpack-google-font-face.php +6 -5 16.3-a.5 → 16.3-a.1 View file →
@@ -73,9 +73,9 @@
73 73 $fonts_in_use = array_map(
74 74 function ( $font_slug ) use ( $font_slug_aliases ) {
75 75 return $font_slug_aliases[ $font_slug ] ?? $font_slug;
76 76 },
77 - $fonts_in_use
77 + $this->fonts_in_use
78 78 );
79 79
80 80 foreach ( $fonts as $font_faces ) {
81 81 $font_family = $font_faces[0]['font-family'] ?? '';
@@ -222,10 +222,11 @@
222 222 if ( ! is_string( $font_family ) ) {
223 223 return null;
224 224 }
225 225
226 - // A preset reference can include a var() fallback and a trailing font stack.
227 - preg_match( '/^\s*var\(\s*--wp--preset--font-family--(?P<slug>[^\s,()]+)\s*[,)]/', $font_family, $matches );
226 + // Full string: var(--wp--preset--font-family--slug).
227 + // We do not care about the origin of the font, only its slug.
228 + preg_match( '/font-family--(?P<slug>.+)\)$/', $font_family, $matches );
228 229
229 230 if ( isset( $matches['slug'] ) ) {
230 231 return $matches['slug'];
231 232 }
@@ -231,15 +232,15 @@
231 232 }
232 233
233 234 // Full string: var:preset|font-family|slug
234 235 // We do not care about the origin of the font, only its slug.
235 - preg_match( '/^\s*var:preset\|font-family\|(?P<slug>[^\s,]+)/', $font_family, $matches );
236 + preg_match( '/font-family\|(?P<slug>.+)$/', $font_family, $matches );
236 237
237 238 if ( isset( $matches['slug'] ) ) {
238 239 return $matches['slug'];
239 240 }
240 241
241 - return self::get_font_family_name( $setting['typography'] );
242 + return $font_family;
242 243 }
243 244
244 245 /**
245 246 * Check if the current screen is the block editor.