Make WordPress Core


Ignore:
Timestamp:
02/29/2024 02:28:52 PM (21 months ago)
Author:
swissspidy
Message:

Interactivity API: Revert [57742] pending a Gutenberg package update.

This function can only be renamed after updating Gutenberg npm packages, as some of the core blocks already use this function.

See #60575.

File:
1 edited

Legend:

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

    r57742 r57743  
    150150 * Example:
    151151 *
    152  *     <div <?php echo wp_interactivity_data_wp_context( array( 'isOpen' => true, 'count' => 0 ) ); ?>>
     152 *     <div <?php echo data_wp_context( array( 'isOpen' => true, 'count' => 0 ) ); ?>>
    153153 *
    154154 * @since 6.5.0
     
    159159 *                the store namespace if specified.
    160160 */
    161 function wp_interactivity_data_wp_context( array $context, string $store_namespace = '' ): string {
     161function data_wp_context( array $context, string $store_namespace = '' ): string {
    162162    return 'data-wp-context=\'' .
    163163        ( $store_namespace ? $store_namespace . '::' : '' ) .
Note: See TracChangeset for help on using the changeset viewer.