From 72ab145390c0be4e1f5cbdc34c138fe2ef8cd7c0 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 13 Nov 2021 00:57:35 +0000 Subject: [PATCH] Embeds: Fix inclusion of `wp-embed-template` script and style when `SCRIPT_DEBUG` is disabled. Amends [52132]. See #44632. git-svn-id: https://develop.svn.wordpress.org/trunk@52151 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/embed.php | 50 +++++---------------------------------- 1 file changed, 6 insertions(+), 44 deletions(-) diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php index e0f4bc937c..338c6a041b 100644 --- a/src/wp-includes/embed.php +++ b/src/wp-includes/embed.php @@ -472,7 +472,7 @@ function get_post_embed_html( $width, $height, $post = null ) { $embed_url .= "#?secret={$secret}"; $output = wp_get_inline_script_tag( - file_get_contents( sprintf( ABSPATH . WPINC . '/js/wp-embed' . wp_scripts_get_suffix() . '.js' ) ) + file_get_contents( ABSPATH . WPINC . '/js/wp-embed' . wp_scripts_get_suffix() . '.js' ) ); $output .= sprintf( @@ -1042,27 +1042,10 @@ function enqueue_embed_scripts() { */ function print_embed_styles() { $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; + $suffix = SCRIPT_DEBUG ? '' : '.min'; ?> > - - include "css/wp-embed-template.min.css" - + - > - - include "js/wp-embed-template.min.js" - - -