We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25015a6 commit 237d199Copy full SHA for 237d199
1 file changed
src/wp-includes/admin-bar.php
@@ -973,6 +973,15 @@ function wp_admin_bar_command_palette_menu( WP_Admin_Bar $wp_admin_bar ): void {
973
)
974
);
975
976
+ /*
977
+ * The script is added as an inline script to avoid an additional dependency.
978
+ *
979
+ * Adding the code within the admin-bar script would require the wp-i18n script to be loaded
980
+ * as a dependency. While this is widely available in the admin, the wp-i18n script is not
981
+ * commonly required on the front end of the site. As the command palette is not available
982
+ * on the front-end, the script would be loaded but remain unused on the front-end of
983
+ * a website.
984
+ */
985
$script = <<<JS
986
(( shortCutLabels ) => {
987
// Assigning agent may error if the HTTP header is blocked at the browser level.
0 commit comments