mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Themes: Remove 'gutenberg' as translation context in _wp_theme_json_webfonts_handler().
Follow-up to [53282]. Props kebbet. See #55567, #46370. git-svn-id: https://develop.svn.wordpress.org/trunk@53288 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
60e13f468c
commit
12d8066d39
@ -3193,14 +3193,14 @@ function _wp_theme_json_webfonts_handler() {
|
||||
|
||||
// Check the font-family.
|
||||
if ( empty( $webfont['font-family'] ) || ! is_string( $webfont['font-family'] ) ) {
|
||||
trigger_error( __( 'Webfont font family must be a non-empty string.', 'gutenberg' ) );
|
||||
trigger_error( __( 'Webfont font family must be a non-empty string.' ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that the `src` property is defined and a valid type.
|
||||
if ( empty( $webfont['src'] ) || ( ! is_string( $webfont['src'] ) && ! is_array( $webfont['src'] ) ) ) {
|
||||
trigger_error( __( 'Webfont src must be a non-empty string or an array of strings.', 'gutenberg' ) );
|
||||
trigger_error( __( 'Webfont src must be a non-empty string or an array of strings.' ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -3208,7 +3208,7 @@ function _wp_theme_json_webfonts_handler() {
|
||||
// Validate the `src` property.
|
||||
foreach ( (array) $webfont['src'] as $src ) {
|
||||
if ( ! is_string( $src ) || '' === trim( $src ) ) {
|
||||
trigger_error( __( 'Each webfont src must be a non-empty string.', 'gutenberg' ) );
|
||||
trigger_error( __( 'Each webfont src must be a non-empty string.' ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -3216,7 +3216,7 @@ function _wp_theme_json_webfonts_handler() {
|
||||
|
||||
// Check the font-weight.
|
||||
if ( ! is_string( $webfont['font-weight'] ) && ! is_int( $webfont['font-weight'] ) ) {
|
||||
trigger_error( __( 'Webfont font weight must be a properly formatted string or integer.', 'gutenberg' ) );
|
||||
trigger_error( __( 'Webfont font weight must be a properly formatted string or integer.' ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user