Interactivity API: Rename `data_wp_context()` to `wp_interactivity_data_wp_context()`.
Increases clarity about where the function belongs to, bringing it in line with other related functions. After initially merging this change in [57742] and reverting it in [57743], this reintroduces it now that the Gutenberg packages have been updated accordingly in [57760]. Props swissspidy, gziolo, cbravobernal, youknowriad, ankitmaru, westonruter, luisherranz, darerodz. Fixes #60575. Built from https://develop.svn.wordpress.org/trunk@57762 git-svn-id: http://core.svn.wordpress.org/trunk@57263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bf79d8bb2c
commit
f98a921c98
|
@ -149,7 +149,7 @@ function wp_interactivity_config( string $store_namespace, array $config = array
|
|||
*
|
||||
* Example:
|
||||
*
|
||||
* <div <?php echo data_wp_context( array( 'isOpen' => true, 'count' => 0 ) ); ?>>
|
||||
* <div <?php echo wp_interactivity_data_wp_context( array( 'isOpen' => true, 'count' => 0 ) ); ?>>
|
||||
*
|
||||
* @since 6.5.0
|
||||
*
|
||||
|
@ -158,7 +158,7 @@ function wp_interactivity_config( string $store_namespace, array $config = array
|
|||
* @return string A complete `data-wp-context` directive with a JSON encoded value representing the context array and
|
||||
* the store namespace if specified.
|
||||
*/
|
||||
function data_wp_context( array $context, string $store_namespace = '' ): string {
|
||||
function wp_interactivity_data_wp_context( array $context, string $store_namespace = '' ): string {
|
||||
return 'data-wp-context=\'' .
|
||||
( $store_namespace ? $store_namespace . '::' : '' ) .
|
||||
( empty( $context ) ? '{}' : wp_json_encode( $context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) ) .
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-beta3-57761';
|
||||
$wp_version = '6.5-beta3-57762';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue