Make WordPress Core


Ignore:
Timestamp:
02/08/2024 09:11:43 AM (13 months ago)
Author:
gziolo
Message:

Interactivity API: Integrate Server Directive Processing

The Interactivity API enables WordPress developers to create dynamic and interactive web experiences with ease using a set of special HTML attributes called directives. Please refer to the [Interactivity API proposal](https://make.wordpress.org/core/2023/03/30/proposal-the-interactivity-api-a-better-developer-experience-in-building-interactive-blocks/) for further details.

It syncs the changes from the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/58066.

Fixes #60356.
Props luisherranz, jonsurrell, swissspidy, westonruter, gziolo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/interactivity-api.php

    r57499 r57563  
    1 <?php
    2 /**
    3  * Interactivity API: Functions and hooks
    4  *
    5  * @package WordPress
    6  * @subpackage Interactivity API
    7  */
    8 
    9 /**
    10  * Registers the interactivity modules.
    11  */
    12 function wp_interactivity_register_script_modules() {
    13     wp_register_script_module(
    14         '@wordpress/interactivity',
    15         includes_url( '/js/dist/interactivity.min.js' ),
    16         array()
    17     );
    18 
    19     wp_register_script_module(
    20         '@wordpress/interactivity-router',
    21         includes_url( '/js/dist/interactivity-router.min.js' ),
    22         array( '@wordpress/interactivity' )
    23     );
    24 }
    25 
    26 add_action( 'init', 'wp_interactivity_register_script_modules' );
Note: See TracChangeset for help on using the changeset viewer.