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.

Props swissspidy, gziolo, cbravobernal, youknowriad, ankitmaru, westonruter, luisherranz, darerodz.
Fixes #60575.
Built from https://develop.svn.wordpress.org/trunk@57742


git-svn-id: http://core.svn.wordpress.org/trunk@57243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2024-02-29 12:28:09 +00:00
parent 2cf42cec66
commit fbeaad601c
2 changed files with 3 additions and 3 deletions

View File

@ -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 ) ) .

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-beta3-57741';
$wp_version = '6.5-beta3-57742';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.