Ticket #29906: 29906-3-comment15.diff
File 29906-3-comment15.diff, 4.0 KB (added by , 9 years ago) |
---|
-
wp-includes/admin-bar.php
101 101 $wp_admin_bar->add_menu( array( 102 102 'id' => 'wp-logo', 103 103 'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'About WordPress' ) . '</span>', 104 'href' => self_admin_url( 'about.php' ),105 104 ) ); 106 105 107 106 if ( is_user_logged_in() ) { … … 187 186 'id' => 'my-account', 188 187 'parent' => 'top-secondary', 189 188 'title' => $howdy . $avatar, 190 'href' => $profile_url,189 'href' => '#', 191 190 'meta' => array( 192 191 'class' => $class, 193 192 ), … … 224 223 'parent' => 'user-actions', 225 224 'id' => 'user-info', 226 225 'title' => $user_info, 227 'href' => $profile_url,226 // 'href' => $profile_url, 228 227 'meta' => array( 229 228 'tabindex' => -1, 230 229 ), … … 276 275 $wp_admin_bar->add_menu( array( 277 276 'id' => 'site-name', 278 277 'title' => $title, 279 'href' => is_admin() ? home_url( '/' ) : admin_url(),278 'href' => is_admin() ? home_url( '/' ) : '', 280 279 ) ); 281 280 282 281 // Create submenu items. 283 282 284 283 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 ) );292 284 293 285 if ( is_blog_admin() && is_multisite() && current_user_can( 'manage_sites' ) ) { 294 286 $wp_admin_bar->add_menu( array( … … 599 591 $wp_admin_bar->add_menu( array( 600 592 'id' => 'new-content', 601 593 'title' => $title, 602 'href' => admin_url( current( array_keys( $actions ) ) ),603 594 ) ); 604 595 605 596 foreach ( $actions as $link => $action ) { -
wp-includes/css/admin-bar.css
206 206 right: 100%; 207 207 } 208 208 209 #wpadminbar .ab-top-menu > li > .ab-item:focus,210 209 #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, 211 #wpadminbar .ab-top-menu > li:hover > .ab-item,212 210 #wpadminbar .ab-top-menu > li.hover > .ab-item { 213 211 background: #32373c; 214 212 color: #45bbe6; 215 213 } 216 214 217 #wpadminbar > #wp-toolbar li:hover span.ab-label,218 215 #wpadminbar > #wp-toolbar li.hover span.ab-label, 219 216 #wpadminbar > #wp-toolbar a:focus span.ab-label { 220 217 color: #45bbe6; … … 243 240 244 241 #wpadminbar .ab-icon:before, 245 242 #wpadminbar .ab-item:before, 243 #wpadminbar .ab-item, 246 244 #wpadminbar #adminbarsearch:before { 247 245 position: relative; 248 246 -webkit-transition: all .1s ease-in-out; … … 275 273 #wpadminbar .quicklinks .menupop.hover ul li a:focus, 276 274 #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, 277 275 #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, 278 #wpadminbar li:hover .ab-icon:before,279 #wpadminbar li:hover .ab-item:before,280 276 #wpadminbar li a:focus .ab-icon:before, 281 277 #wpadminbar li .ab-item:focus:before, 282 278 #wpadminbar li.hover .ab-icon:before, -
wp-includes/js/admin-bar.js
28 28 e.stopPropagation(); 29 29 e.preventDefault(); 30 30 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 } 32 36 33 37 if ( unbind ) { 34 38 $('li.menupop').off('click.wp-mobile-hover'); … … 124 128 }); 125 129 126 130 $('#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 } 129 137 130 138 e.preventDefault(); 131 139 $('html, body').animate({ scrollTop: 0 }, 'fast');