Changeset 57492 for trunk/src/wp-includes/class-wp-script-modules.php
- Timestamp:
- 01/31/2024 08:29:18 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-script-modules.php
r57345 r57492 212 212 * 213 213 * @since 6.5.0 214 * 215 * @global WP_Scripts $wp_scripts The WP_Scripts object for printing the polyfill. 214 216 */ 215 217 public function print_import_map() { 216 218 $import_map = $this->get_import_map(); 217 219 if ( ! empty( $import_map['imports'] ) ) { 220 global $wp_scripts; 221 if ( isset( $wp_scripts ) ) { 222 wp_print_inline_script_tag( 223 wp_get_script_polyfill( 224 $wp_scripts, 225 array( 226 'HTMLScriptElement.supports && HTMLScriptElement.supports("importmap")' => 'wp-polyfill-importmap', 227 ) 228 ), 229 array( 230 'id' => 'wp-load-polyfill-importmap', 231 ) 232 ); 233 } 218 234 wp_print_inline_script_tag( 219 235 wp_json_encode( $import_map, JSON_HEX_TAG | JSON_HEX_AMP ),
Note: See TracChangeset
for help on using the changeset viewer.