Changeset 56682 for trunk/src/wp-includes/embed.php
- Timestamp:
- 09/25/2023 05:04:41 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/embed.php
r56180 r56682 1060 1060 1061 1061 /** 1062 * Prints the CSS in the embed iframe header. 1063 * 1064 * @since 4.4.0 1065 */ 1066 function print_embed_styles() { 1067 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; 1068 $suffix = SCRIPT_DEBUG ? '' : '.min'; 1069 ?> 1070 <style<?php echo $type_attr; ?>> 1071 <?php echo file_get_contents( ABSPATH . WPINC . "/css/wp-embed-template$suffix.css" ); ?> 1072 </style> 1073 <?php 1062 * Enqueues the CSS in the embed iframe header. 1063 * 1064 * @since 6.4.0 1065 */ 1066 function wp_enqueue_embed_styles() { 1067 // Back-compat for plugins that disable functionality by unhooking this action. 1068 if ( ! has_action( 'embed_head', 'print_embed_styles' ) ) { 1069 return; 1070 } 1071 remove_action( 'embed_head', 'print_embed_styles' ); 1072 1073 $suffix = wp_scripts_get_suffix(); 1074 $handle = 'wp-embed-template'; 1075 wp_register_style( $handle, false ); 1076 wp_add_inline_style( $handle, file_get_contents( ABSPATH . WPINC . "/css/wp-embed-template$suffix.css" ) ); 1077 wp_enqueue_style( $handle ); 1074 1078 } 1075 1079
Note: See TracChangeset
for help on using the changeset viewer.