Skip to content

Commit c83aa4e

Browse files
committed
Cleanup function
1 parent b920d7d commit c83aa4e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/wp-includes/fonts/class-wp-font-utils.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private static function maybe_add_quotes( $item ) {
5959
* @see https://drafts.csswg.org/css-fonts/#family-name-syntax
6060
*
6161
* @param string $font_family CSS text @font-face font-family value.
62-
* @return string Normalized value.
62+
* @return string|null Normalized value or null if the value could not be normalized.
6363
*/
6464
public static function normalize_css_font_face_font_family( string $font_family ): ?string {
6565
$processor = WP_CSS_Token_Processor::create( $font_family );
@@ -74,8 +74,7 @@ public static function normalize_css_font_face_font_family( string $font_family
7474

7575
$token_type = $processor->get_token_type();
7676
if ( WP_CSS_Token_Processor::TOKEN_STRING === $token_type ) {
77-
$plaintext_font_family = $processor->get_token_value();
78-
return WP_CSS_Builder::string( $plaintext_font_family );
77+
return WP_CSS_Builder::string( $processor->get_token_value() );
7978
}
8079

8180
/**

0 commit comments

Comments
 (0)