File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -969,16 +969,16 @@ function wp_admin_bar_command_palette_menu( WP_Admin_Bar $wp_admin_bar ): void {
969969 * wp-i18n to be loaded as a dependency.
970970 */
971971 $ function = <<<'JS'
972- ( shortcutLabels ) => {
972+ ( appleOSLabel ) => {
973973 if ( navigator.platform.startsWith("Mac") || navigator.platform === "iPhone" || navigator.platform === "iPad" ) {
974- document.querySelector( '#wp-admin-bar-command-palette .ab-label kbd' ).textContent = shortcutLabels.appleOS ;
974+ document.querySelector( '#wp-admin-bar-command-palette .ab-label kbd' ).textContent = appleOSLabel ;
975975 }
976976 }
977977 JS;
978978 $ script = sprintf (
979979 '( %s )( %s ); ' ,
980980 $ function ,
981- wp_json_encode ( $ shortcut_labels , JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
981+ wp_json_encode ( $ shortcut_labels[ ' appleOS ' ] , JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
982982 );
983983 $ script .= "\n//# sourceURL=wp_admin_bar_command_palette_menu " ;
984984 $ wp_admin_bar ->add_node (
You can’t perform that action at this time.
0 commit comments