diff --git a/src/wp-includes/fonts/class-wp-font-face.php b/src/wp-includes/fonts/class-wp-font-face.php index 193a5d0951ddb..3df3c5ce265d8 100644 --- a/src/wp-includes/fonts/class-wp-font-face.php +++ b/src/wp-includes/fonts/class-wp-font-face.php @@ -137,22 +137,18 @@ private function validate_font_face_declarations( array $font_face ) { // Check the font-family. if ( empty( $font_face['font-family'] ) || ! is_string( $font_face['font-family'] ) ) { - // @todo replace with `wp_trigger_error()`. - _doing_it_wrong( + wp_trigger_error( __METHOD__, - __( 'Font font-family must be a non-empty string.' ), - '6.4.0' + __( 'Font font-family must be a non-empty string.' ) ); return false; } // Make sure that local fonts have 'src' defined. if ( empty( $font_face['src'] ) || ( ! is_string( $font_face['src'] ) && ! is_array( $font_face['src'] ) ) ) { - // @todo replace with `wp_trigger_error()`. - _doing_it_wrong( + wp_trigger_error( __METHOD__, - __( 'Font src must be a non-empty string or an array of strings.' ), - '6.4.0' + __( 'Font src must be a non-empty string or an array of strings.' ) ); return false; } @@ -160,11 +156,9 @@ private function validate_font_face_declarations( array $font_face ) { // Validate the 'src' property. foreach ( (array) $font_face['src'] as $src ) { if ( empty( $src ) || ! is_string( $src ) ) { - // @todo replace with `wp_trigger_error()`. - _doing_it_wrong( + wp_trigger_error( __METHOD__, - __( 'Each font src must be a non-empty string.' ), - '6.4.0' + __( 'Each font src must be a non-empty string.' ) ); return false; } @@ -172,11 +166,9 @@ private function validate_font_face_declarations( array $font_face ) { // Check the font-weight. if ( ! is_string( $font_face['font-weight'] ) && ! is_int( $font_face['font-weight'] ) ) { - // @todo replace with `wp_trigger_error()`. - _doing_it_wrong( + wp_trigger_error( __METHOD__, - __( 'Font font-weight must be a properly formatted string or integer.' ), - '6.4.0' + __( 'Font font-weight must be a properly formatted string or integer.' ) ); return false; }