Ticket #37949: 37949.2.patch
| File 37949.2.patch, 1.8 KB (added by , 9 years ago) |
|---|
-
src/wp-includes/admin-bar.php
107 107 * @param WP_Admin_Bar $wp_admin_bar 108 108 */ 109 109 function wp_admin_bar_wp_menu( $wp_admin_bar ) { 110 $wp_admin_bar->add_menu( array( 110 if ( current_user_can( 'read' ) ) { 111 $about_url = self_admin_url( 'about.php' ); 112 } elseif ( is_multisite() ) { 113 $about_url = get_dashboard_url( get_current_user_id(), 'about.php' ); 114 } else { 115 $about_url = false; 116 } 117 118 $wp_logo_menu_args = array( 111 119 'id' => 'wp-logo', 112 120 'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'About WordPress' ) . '</span>', 113 'href' => self_admin_url( 'about.php' ),114 ) );121 'href' => $about_url, 122 ); 115 123 116 if ( is_user_logged_in() ) { 124 // Set tabindex="0" to make sub menus accessible when no URL is available. 125 if ( ! $about_url ) { 126 $wp_logo_menu_args['meta'] = array( 127 'tabindex' => 0, 128 ); 129 } 130 131 $wp_admin_bar->add_menu( $wp_logo_menu_args ); 132 133 if ( $about_url ) { 117 134 // Add "About WordPress" link 118 135 $wp_admin_bar->add_menu( array( 119 136 'parent' => 'wp-logo', 120 137 'id' => 'about', 121 138 'title' => __('About WordPress'), 122 'href' => self_admin_url( 'about.php' ),139 'href' => $about_url, 123 140 ) ); 124 141 } 125 142 … … 294 311 } 295 312 296 313 if ( is_network_admin() ) { 297 /* translators: %s: site name */ 314 /* translators: %s: site name */ 298 315 $blogname = sprintf( __( 'Network Admin: %s' ), esc_html( get_current_site()->site_name ) ); 299 316 } elseif ( is_user_admin() ) { 300 /* translators: %s: site name */ 317 /* translators: %s: site name */ 301 318 $blogname = sprintf( __( 'User Dashboard: %s' ), esc_html( get_current_site()->site_name ) ); 302 319 } 303 320