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: http://core.svn.wordpress.org/trunk@57592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1953f53b01
commit
6edbf28fec
|
@ -208,6 +208,9 @@ final class WP_Interactivity_API {
|
||||||
public function add_hooks() {
|
public function add_hooks() {
|
||||||
add_action( 'wp_enqueue_scripts', array( $this, 'register_script_modules' ) );
|
add_action( 'wp_enqueue_scripts', array( $this, 'register_script_modules' ) );
|
||||||
add_action( 'wp_footer', array( $this, 'print_client_interactivity_data' ) );
|
add_action( 'wp_footer', array( $this, 'print_client_interactivity_data' ) );
|
||||||
|
|
||||||
|
add_action( 'admin_enqueue_scripts', array( $this, 'register_script_modules' ) );
|
||||||
|
add_action( 'admin_print_footer_scripts', array( $this, 'print_client_interactivity_data' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.6-alpha-58126';
|
$wp_version = '6.6-alpha-58127';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue