PluginProbe
Gutenberg / 17.2.4
Gutenberg v17.2.4
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / lib / experimental / interactivity-api / modules.php

modules.php in Gutenberg 17.2.4, at lib/experimental/interactivity-api/modules.php

34 lines 876 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Interactive modules.
4 *
5 * @package Gutenberg
6 * @subpackage Interactivity API
7 */
8
9 /**
10 * Register the `@wordpress/interactivity` module.
11 */
12 function gutenberg_register_interactivity_module() {
13 gutenberg_register_module(
14 '@wordpress/interactivity',
15 gutenberg_url( '/build/interactivity/index.min.js' ),
16 array(),
17 defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' )
18 );
19
20 // TODO: Replace with a simpler version that only provides support for import maps.
21 // TODO: Load only if the browser doesn't support import maps (https://github.com/guybedford/es-module-shims/issues/371).
22 wp_enqueue_script(
23 'es-module-shims',
24 gutenberg_url( '/build/modules/importmap-polyfill.min.js' ),
25 array(),
26 null,
27 array(
28 'strategy' => 'defer',
29 )
30 );
31 }
32
33 add_action( 'wp_enqueue_scripts', 'gutenberg_register_interactivity_module' );
34