From 6edbf28fec2480f08cf5b3b6e7de5acfe802bb9c Mon Sep 17 00:00:00 2001 From: gziolo Date: Fri, 10 May 2024 09:13:05 +0000 Subject: [PATCH] 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 --- wp-includes/interactivity-api/class-wp-interactivity-api.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/interactivity-api/class-wp-interactivity-api.php b/wp-includes/interactivity-api/class-wp-interactivity-api.php index 3db539aae6..cc894c7e30 100644 --- a/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -208,6 +208,9 @@ final class WP_Interactivity_API { public function add_hooks() { add_action( 'wp_enqueue_scripts', array( $this, 'register_script_modules' ) ); 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' ) ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 028e6f1d15..ae549ed77c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @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.