Changeset 55314
- Timestamp:
- 02/13/2023 02:31:06 PM (20 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r55279 r55314 3521 3521 * 3522 3522 * @since 6.0.0 3523 * @since 6.2.0 Removed local() CSS. 3523 3524 * 3524 3525 * @param string $font_family Font family. … … 3527 3528 */ 3528 3529 $fn_compile_src = static function( $font_family, array $value ) { 3529 $src = "local($font_family)";3530 $src = ''; 3530 3531 3531 3532 foreach ( $value as $item ) { … … 3542 3543 : ", url('{$item['url']}') format('{$item['format']}')"; 3543 3544 } 3545 3546 $src = ltrim( $src, ', ' ); 3544 3547 3545 3548 return $src; -
trunk/tests/phpunit/tests/webfonts/wpThemeJsonWebfontsHandler.php
r55086 r55314 77 77 * @ticket 55567 78 78 * @ticket 46370 79 * @ticket 57430 79 80 */ 80 81 public function test_font_face_generated_from_themejson() { … … 83 84 $expected = <<<EOF 84 85 <style id='wp-webfonts-inline-css' type='text/css'> 85 @font-face{font-family:"Source Serif Pro";font-style:normal;font-weight:200 900;font-display:fallback;src: local("Source Serif Pro"), url('THEME_ROOT_URL/assets/fonts/SourceSerif4Variable-Roman.ttf.woff2') format('woff2');font-stretch:normal;}@font-face{font-family:"Source Serif Pro";font-style:italic;font-weight:200 900;font-display:fallback;src:local("Source Serif Pro"),url('THEME_ROOT_URL/assets/fonts/SourceSerif4Variable-Italic.ttf.woff2') format('woff2');font-stretch:normal;}86 @font-face{font-family:"Source Serif Pro";font-style:normal;font-weight:200 900;font-display:fallback;src:url('THEME_ROOT_URL/assets/fonts/SourceSerif4Variable-Roman.ttf.woff2') format('woff2');font-stretch:normal;}@font-face{font-family:"Source Serif Pro";font-style:italic;font-weight:200 900;font-display:fallback;src:url('THEME_ROOT_URL/assets/fonts/SourceSerif4Variable-Italic.ttf.woff2') format('woff2');font-stretch:normal;} 86 87 </style> 87 88 EOF;
Note: See TracChangeset
for help on using the changeset viewer.