Changeset 52151
- Timestamp:
- 11/13/2021 12:57:35 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/embed.php
r52132 r52151 473 473 474 474 $output = wp_get_inline_script_tag( 475 file_get_contents( sprintf( ABSPATH . WPINC . '/js/wp-embed' . wp_scripts_get_suffix() . '.js' ))475 file_get_contents( ABSPATH . WPINC . '/js/wp-embed' . wp_scripts_get_suffix() . '.js' ) 476 476 ); 477 477 … … 1043 1043 function print_embed_styles() { 1044 1044 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; 1045 $suffix = SCRIPT_DEBUG ? '' : '.min'; 1045 1046 ?> 1046 1047 <style<?php echo $type_attr; ?>> 1047 <?php 1048 if ( SCRIPT_DEBUG ) { 1049 readfile( ABSPATH . WPINC . '/css/wp-embed-template.css' ); 1050 } else { 1051 /* 1052 * If you're looking at a src version of this file, you'll see an "include" 1053 * statement below. This is used by the `npm run build` process to directly 1054 * include a minified version of wp-oembed-embed.css, instead of using the 1055 * readfile() method from above. 1056 * 1057 * If you're looking at a build version of this file, you'll see a string of 1058 * minified CSS. If you need to debug it, please turn on SCRIPT_DEBUG 1059 * and edit wp-embed-template.css directly. 1060 */ 1061 ?> 1062 include "css/wp-embed-template.min.css" 1063 <?php 1064 } 1065 ?> 1048 <?php echo file_get_contents( ABSPATH . WPINC . "/css/wp-embed-template$suffix.css" ); ?> 1066 1049 </style> 1067 1050 <?php … … 1074 1057 */ 1075 1058 function print_embed_scripts() { 1076 $type_attr = current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"'; 1077 ?> 1078 <script<?php echo $type_attr; ?>> 1079 <?php 1080 if ( SCRIPT_DEBUG ) { 1081 readfile( ABSPATH . WPINC . '/js/wp-embed-template.js' ); 1082 } else { 1083 /* 1084 * If you're looking at a src version of this file, you'll see an "include" 1085 * statement below. This is used by the `npm run build` process to directly 1086 * include a minified version of wp-embed-template.js, instead of using the 1087 * readfile() method from above. 1088 * 1089 * If you're looking at a build version of this file, you'll see a string of 1090 * minified JavaScript. If you need to debug it, please turn on SCRIPT_DEBUG 1091 * and edit wp-embed-template.js directly. 1092 */ 1093 ?> 1094 include "js/wp-embed-template.min.js" 1095 <?php 1096 } 1097 ?> 1098 </script> 1099 <?php 1059 wp_print_inline_script_tag( 1060 file_get_contents( ABSPATH . WPINC . '/js/wp-embed-template' . wp_scripts_get_suffix() . '.js' ) 1061 ); 1100 1062 } 1101 1063
Note: See TracChangeset
for help on using the changeset viewer.