Toolbar: Update links to the about page if current user can't access the dashboard of the current site.
Add missing focus styling for menu items with an icon. Fixes #37949. Built from https://develop.svn.wordpress.org/trunk@38660 git-svn-id: http://core.svn.wordpress.org/trunk@38603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b5d68be194
commit
7627255d7e
|
@ -324,6 +324,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@ ul#adminmenu > li.current > a.current:after {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -107,19 +107,36 @@ function wp_admin_bar_render() {
|
|||
* @param WP_Admin_Bar $wp_admin_bar
|
||||
*/
|
||||
function wp_admin_bar_wp_menu( $wp_admin_bar ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
if ( current_user_can( 'read' ) ) {
|
||||
$about_url = self_admin_url( 'about.php' );
|
||||
} elseif ( is_multisite() ) {
|
||||
$about_url = get_dashboard_url( get_current_user_id(), 'about.php' );
|
||||
} else {
|
||||
$about_url = false;
|
||||
}
|
||||
|
||||
$wp_logo_menu_args = array(
|
||||
'id' => 'wp-logo',
|
||||
'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'About WordPress' ) . '</span>',
|
||||
'href' => self_admin_url( 'about.php' ),
|
||||
) );
|
||||
'href' => $about_url,
|
||||
);
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
// Set tabindex="0" to make sub menus accessible when no URL is available.
|
||||
if ( ! $about_url ) {
|
||||
$wp_logo_menu_args['meta'] = array(
|
||||
'tabindex' => 0,
|
||||
);
|
||||
}
|
||||
|
||||
$wp_admin_bar->add_menu( $wp_logo_menu_args );
|
||||
|
||||
if ( $about_url ) {
|
||||
// Add "About WordPress" link
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'wp-logo',
|
||||
'id' => 'about',
|
||||
'title' => __('About WordPress'),
|
||||
'href' => self_admin_url( 'about.php' ),
|
||||
'href' => $about_url,
|
||||
) );
|
||||
}
|
||||
|
||||
|
|
|
@ -294,6 +294,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -294,6 +294,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
|||
#wpadminbar li:hover .ab-item:before,
|
||||
#wpadminbar li a:focus .ab-icon:before,
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li .ab-item:focus .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38659';
|
||||
$wp_version = '4.7-alpha-38660';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue