Changeset 38660 for trunk/src/wp-includes/admin-bar.php
- Timestamp:
- 09/27/2016 07:00:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/admin-bar.php
r38634 r38660 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 ) ); 115 116 if ( is_user_logged_in() ) { 121 'href' => $about_url, 122 ); 123 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( … … 120 137 'id' => 'about', 121 138 'title' => __('About WordPress'), 122 'href' => self_admin_url( 'about.php' ),139 'href' => $about_url, 123 140 ) ); 124 141 } … … 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 }
Note: See TracChangeset
for help on using the changeset viewer.