Commit 7341300ff8 for wordpress.org
commit 7341300ff82815471fe3f4439669aa1ce02a1ba8
Author: davidbaumwald <davidbaumwald@git.wordpress.org>
Date: Tue Nov 4 14:19:36 2025 +0000
Command Palette: Ensure `$menu_label` is initialized before using it.
Unprops davidbaumwald.
Follow-up to [61126].
Props cbravobernal.
See #64196.
Built from https://develop.svn.wordpress.org/trunk@61127
git-svn-id: http://core.svn.wordpress.org/trunk@60463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index 4e73b50d4a..dfaf3a0641 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -3442,7 +3442,8 @@ function wp_enqueue_command_palette_assets() {
}
// Remove all HTML tags and their contents.
- $processor = new WP_HTML_Tag_Processor( $menu_item[0] );
+ $processor = new WP_HTML_Tag_Processor( $menu_item[0] );
+ $menu_label = '';
while ( $processor->next_token() ) {
if ( '#text' === $processor->get_token_name() ) {
$menu_label .= $processor->get_modifiable_text();
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 3300e39cf3..39dc1d6758 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.9-beta2-61126';
+$wp_version = '6.9-beta2-61127';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.