diff --git a/lib/compat/wordpress-6.5/interactivity-api/class-wp-interactivity-api.php b/lib/compat/wordpress-6.5/interactivity-api/class-wp-interactivity-api.php index bcc2634ce7b3a..34f022f488a58 100644 --- a/lib/compat/wordpress-6.5/interactivity-api/class-wp-interactivity-api.php +++ b/lib/compat/wordpress-6.5/interactivity-api/class-wp-interactivity-api.php @@ -196,7 +196,7 @@ public function register_script_modules() { * @since 6.5.0 */ public function add_hooks() { - add_filter( 'gb_scriptmoduledata_@wordpress/interactivity', array( $this, 'print_client_interactivity_data' ) ); + add_filter( 'scriptmoduledata_@wordpress/interactivity', array( $this, 'print_client_interactivity_data' ) ); } /** diff --git a/lib/experimental/script-modules.php b/lib/experimental/script-modules.php index b17054fd74966..a210f06362d44 100644 --- a/lib/experimental/script-modules.php +++ b/lib/experimental/script-modules.php @@ -215,7 +215,7 @@ function gutenberg_print_script_module_data(): void { } foreach ( array_keys( $modules ) as $module_id ) { - $data = apply_filters( 'gb_scriptmoduledata_' . $module_id, array() ); + $data = apply_filters( 'scriptmoduledata_' . $module_id, array() ); if ( ! empty( $data ) ) { /* * This data will be printed as JSON inside a script tag like this: @@ -264,7 +264,7 @@ function gutenberg_print_script_module_data(): void { wp_json_encode( $data, $json_encode_flags ), array( 'type' => 'application/json', - 'id' => 'gb-scriptmodule-data_' . $module_id, + 'id' => 'wp-scriptmodule-data_' . $module_id, ) ); } diff --git a/packages/interactivity/src/store.ts b/packages/interactivity/src/store.ts index 96a1e970bf568..ea5ef07a2613e 100644 --- a/packages/interactivity/src/store.ts +++ b/packages/interactivity/src/store.ts @@ -321,7 +321,7 @@ export function store( export const parseInitialData = ( dom = document ) => { const jsonDataScriptTag = dom.getElementById( - 'gb-scriptmodule-data_@wordpress/interactivity' + 'wp-scriptmodule-data_@wordpress/interactivity' ); if ( jsonDataScriptTag?.textContent ) { try {