Make WordPress Core

Ticket #29906: 29906-3-comment15.diff

File 29906-3-comment15.diff, 4.0 KB (added by seanchayes, 9 years ago)
  • wp-includes/admin-bar.php

     
    101101        $wp_admin_bar->add_menu( array(
    102102                'id'    => 'wp-logo',
    103103                'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'About WordPress' ) . '</span>',
    104                 'href'  => self_admin_url( 'about.php' ),
    105104        ) );
    106105
    107106        if ( is_user_logged_in() ) {
     
    187186                'id'        => 'my-account',
    188187                'parent'    => 'top-secondary',
    189188                'title'     => $howdy . $avatar,
    190                 'href'      => $profile_url,
     189                'href'      => '#',
    191190                'meta'      => array(
    192191                        'class'     => $class,
    193192                ),
     
    224223                'parent' => 'user-actions',
    225224                'id'     => 'user-info',
    226225                'title'  => $user_info,
    227                 'href'   => $profile_url,
     226//              'href'   => $profile_url,
    228227                'meta'   => array(
    229228                        'tabindex' => -1,
    230229                ),
     
    276275        $wp_admin_bar->add_menu( array(
    277276                'id'    => 'site-name',
    278277                'title' => $title,
    279                 'href'  => is_admin() ? home_url( '/' ) : admin_url(),
     278                'href'  => is_admin() ? home_url( '/' ) : '',
    280279        ) );
    281280
    282281        // Create submenu items.
    283282
    284283        if ( is_admin() ) {
    285                 // Add an option to visit the site.
    286                 $wp_admin_bar->add_menu( array(
    287                         'parent' => 'site-name',
    288                         'id'     => 'view-site',
    289                         'title'  => __( 'Visit Site' ),
    290                         'href'   => home_url( '/' ),
    291                 ) );
    292284
    293285                if ( is_blog_admin() && is_multisite() && current_user_can( 'manage_sites' ) ) {
    294286                        $wp_admin_bar->add_menu( array(
     
    599591        $wp_admin_bar->add_menu( array(
    600592                'id'    => 'new-content',
    601593                'title' => $title,
    602                 'href'  => admin_url( current( array_keys( $actions ) ) ),
    603594        ) );
    604595
    605596        foreach ( $actions as $link => $action ) {
  • wp-includes/css/admin-bar.css

     
    206206        right: 100%;
    207207}
    208208
    209 #wpadminbar .ab-top-menu > li > .ab-item:focus,
    210209#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus,
    211 #wpadminbar .ab-top-menu > li:hover > .ab-item,
    212210#wpadminbar .ab-top-menu > li.hover > .ab-item {
    213211        background: #32373c;
    214212        color: #45bbe6;
    215213}
    216214
    217 #wpadminbar > #wp-toolbar li:hover span.ab-label,
    218215#wpadminbar > #wp-toolbar li.hover span.ab-label,
    219216#wpadminbar > #wp-toolbar a:focus span.ab-label {
    220217        color: #45bbe6;
     
    243240
    244241#wpadminbar .ab-icon:before,
    245242#wpadminbar .ab-item:before,
     243#wpadminbar .ab-item,
    246244#wpadminbar #adminbarsearch:before {
    247245        position: relative;
    248246        -webkit-transition: all .1s ease-in-out;
     
    275273#wpadminbar .quicklinks .menupop.hover ul li a:focus,
    276274#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover,
    277275#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,
    278 #wpadminbar li:hover .ab-icon:before,
    279 #wpadminbar li:hover .ab-item:before,
    280276#wpadminbar li a:focus .ab-icon:before,
    281277#wpadminbar li .ab-item:focus:before,
    282278#wpadminbar li.hover .ab-icon:before,
  • wp-includes/js/admin-bar.js

     
    2828                                        e.stopPropagation();
    2929                                        e.preventDefault();
    3030                                        el.addClass('hover');
    31                                 }
     31                                } else if ( el.children('.ab-empty-item') ) {
     32                    if ( el.hasClass('hover') ) {
     33                        adminbar.find('li.menupop.hover').removeClass('hover');
     34                    }
     35                }
    3236
    3337                                if ( unbind ) {
    3438                                        $('li.menupop').off('click.wp-mobile-hover');
     
    124128                });
    125129
    126130                $('#wpadminbar').click( function(e) {
    127                         if ( e.target.id != 'wpadminbar' && e.target.id != 'wp-admin-bar-top-secondary' )
    128                                 return;
     131                        if ( e.target.id != 'wpadminbar' ) {
     132                return;
     133            } else {
     134                adminbar.find('li.menupop.hover').removeClass('hover');
     135                return;
     136            }
    129137
    130138                        e.preventDefault();
    131139                        $('html, body').animate({ scrollTop: 0 }, 'fast');