diff --git a/includes/core.php b/includes/core.php index c337d80a..135a96eb 100755 --- a/includes/core.php +++ b/includes/core.php @@ -507,7 +507,9 @@ function google_fonts_style_loader_tag( $tag, $handle, $href, $media ) { // Remove once core supports preload natively. $tag = "\n" . $tag; - $tag = str_replace( array( "media=\"$media\"", "media='$media'" ), 'media="print" onload="this.media=\'all\'"', $tag ); + if ( ! is_amp() ) { + $tag = str_replace( array( "media=\"$media\"", "media='$media'" ), 'media="print" onload="this.media=\'all\'"', $tag ); + } // phpcs:disable WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet $tag .= "\n";