Changeset 61979
- Timestamp:
- 03/12/2026 05:23:14 AM (3 weeks ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
-
admin-bar.php (modified) (2 diffs)
-
css/admin-bar.css (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/admin-bar.php
r61912 r61979 946 946 */ 947 947 function wp_admin_bar_command_palette_menu( WP_Admin_Bar $wp_admin_bar ): void { 948 if ( ! is_admin() ) {948 if ( ! is_admin() || ! wp_script_is( 'wp-core-commands', 'enqueued' ) ) { 949 949 return; 950 950 } … … 955 955 : _x( 'Ctrl+K', 'keyboard shortcut to open the command palette' ); 956 956 $title = sprintf( 957 '<span class="ab- label"><kbd>%s</kbd><span class="screen-reader-text"> %s</span></span>',957 '<span class="ab-icon" aria-hidden="true"></span><span class="ab-label"><kbd>%s</kbd><span class="screen-reader-text"> %s</span></span>', 958 958 $shortcut_label, 959 959 /* translators: Hidden accessibility text. */ -
trunk/src/wp-includes/css/admin-bar.css
r61861 r61979 696 696 697 697 /** 698 * Command Palette 699 */ 700 #wpadminbar #wp-admin-bar-command-palette .ab-icon { 701 display: none; /* Icon displayed only on mobile */ 702 } 703 704 #wpadminbar #wp-admin-bar-command-palette .ab-icon:before { 705 content: "\f179"; 706 content: "\f179" / ''; 707 } 708 709 #wpadminbar #wp-admin-bar-command-palette kbd { 710 background: transparent; 711 } 712 713 /** 698 714 * Customize support classes 699 715 */ … … 893 909 #wpadminbar #wp-admin-bar-site-editor > .ab-item:before, 894 910 #wpadminbar #wp-admin-bar-customize > .ab-item:before, 895 #wpadminbar #wp-admin-bar-my-account > .ab-item:before { 911 #wpadminbar #wp-admin-bar-my-account > .ab-item:before, 912 #wpadminbar #wp-admin-bar-command-palette .ab-icon:before { 896 913 display: block; 897 914 text-indent: 0; … … 936 953 } 937 954 938 /* Comments */ 939 #wpadminbar #wp-admin-bar-comments .ab-icon { 955 /* Comments and Command Palette */ 956 #wpadminbar #wp-admin-bar-comments .ab-icon, 957 #wpadminbar #wp-admin-bar-command-palette .ab-icon { 940 958 margin: 0; 941 959 } 942 960 943 #wpadminbar #wp-admin-bar-comments .ab-icon:before { 961 #wpadminbar #wp-admin-bar-command-palette .ab-icon { 962 display: block; /* Icon is only shown on mobile, while the keyboard shortcut is hidden */ 963 } 964 965 #wpadminbar #wp-admin-bar-comments .ab-icon:before, 966 #wpadminbar #wp-admin-bar-command-palette .ab-icon:before { 944 967 display: block; 945 968 font-size: 34px; … … 1010 1033 #wpadminbar li#wp-admin-bar-edit, 1011 1034 #wpadminbar li#wp-admin-bar-comments, 1012 #wpadminbar li#wp-admin-bar-my-account { 1035 #wpadminbar li#wp-admin-bar-my-account, 1036 #wpadminbar li#wp-admin-bar-command-palette { 1013 1037 display: block; 1014 1038 } … … 1041 1065 #wpadminbar #wp-admin-bar-new-content, 1042 1066 #wpadminbar #wp-admin-bar-edit, 1043 #wpadminbar #wp-admin-bar-my-account { 1067 #wpadminbar #wp-admin-bar-my-account, 1068 #wpadminbar #wp-admin-bar-command-palette { 1044 1069 position: static; 1045 1070 }
Note: See TracChangeset
for help on using the changeset viewer.