From b665eab47e524c2058d03e6d639d43a2be111f5f Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 13 Nov 2021 00:58:59 +0000 Subject: [PATCH] Embeds: Fix inclusion of `wp-embed-template` script and style when `SCRIPT_DEBUG` is disabled. Amends [52132]. See #44632. Built from https://develop.svn.wordpress.org/trunk@52151 git-svn-id: http://core.svn.wordpress.org/trunk@51743 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/embed.php | 50 +++++------------------------------------ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 45 deletions(-) diff --git a/wp-includes/embed.php b/wp-includes/embed.php index e0f4bc937c..338c6a041b 100644 --- a/wp-includes/embed.php +++ b/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" - - -