Skip to content

Commit d01f846

Browse files
committed
Interactivity API: Cannot be used from wp-admin
Interactivity API has hooks that run on the frontend, but not in wp-admin. This means that interactivity data was not printed to the HTML and the interactivity Script Modules were not registered. Fixes #61087. Props jonsurrell, cbravobernal, gziolo. Built from https://develop.svn.wordpress.org/trunk@58127 git-svn-id: https://core.svn.wordpress.org/trunk@57592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 6fdf475 commit d01f846

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

wp-includes/interactivity-api/class-wp-interactivity-api.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ public function register_script_modules() {
208208
public function add_hooks() {
209209
add_action( 'wp_enqueue_scripts', array( $this, 'register_script_modules' ) );
210210
add_action( 'wp_footer', array( $this, 'print_client_interactivity_data' ) );
211+
212+
add_action( 'admin_enqueue_scripts', array( $this, 'register_script_modules' ) );
213+
add_action( 'admin_print_footer_scripts', array( $this, 'print_client_interactivity_data' ) );
211214
}
212215

213216
/**

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '6.6-alpha-58126';
19+
$wp_version = '6.6-alpha-58127';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)