mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@38660 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -407,4 +407,28 @@ class Tests_AdminBar extends WP_UnitTestCase {
|
||||
|
||||
$this->assertNull( $node );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 37949
|
||||
*/
|
||||
public function test_admin_bar_does_not_add_about_page_url() {
|
||||
wp_set_current_user( self::$no_role_id );
|
||||
|
||||
$wp_admin_bar = $this->get_standard_admin_bar();
|
||||
$node = $wp_admin_bar->get_node( 'wp-logo' );
|
||||
|
||||
$this->assertNotNull( $node );
|
||||
$this->assertSame( false, $node->href );
|
||||
$this->assertArrayHasKey( 'tabindex', $node->meta );
|
||||
$this->assertSame( 0, $node->meta['tabindex'] );
|
||||
|
||||
wp_set_current_user( self::$editor_id );
|
||||
|
||||
$wp_admin_bar = $this->get_standard_admin_bar();
|
||||
$node = $wp_admin_bar->get_node( 'wp-logo' );
|
||||
|
||||
$this->assertNotNull( $node );
|
||||
$this->assertSame( admin_url( 'about.php' ), $node->href );
|
||||
$this->assertArrayNotHasKey( 'tabindex', $node->meta );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user