Ticket #37513: 37513.2.diff
File 37513.2.diff, 2.6 KB (added by , 8 years ago) |
---|
-
src/wp-includes/class-wp-admin-bar.php
474 474 if ( $node->type != 'item' ) 475 475 return; 476 476 477 $is_parent = ! empty( $node->children ); 478 $has_link = ! empty( $node->href ); 477 $is_parent = ! empty( $node->children ); 478 $has_link = ! empty( $node->href ); 479 $is_root_top_item = 'root-default' === $node->parent; 480 $is_top_secondary_item = 'top-secondary' === $node->parent; 479 481 480 482 // Allow only numeric values, then casted to integers, and allow a tabindex value of `0` for a11y. 481 483 $tabindex = ( isset( $node->meta['tabindex'] ) && is_numeric( $node->meta['tabindex'] ) ) ? (int) $node->meta['tabindex'] : ''; 482 484 $aria_attributes = ( '' !== $tabindex ) ? ' tabindex="' . $tabindex . '"' : ''; 483 485 484 $menuclass = '';486 $menuclass = $arrow_right = ''; 485 487 486 488 if ( $is_parent ) { 487 489 $menuclass = 'menupop '; … … 488 490 $aria_attributes .= ' aria-haspopup="true"'; 489 491 } 490 492 493 // Print the right arrow icon for the primary menu children with children. 494 if ( ! $is_root_top_item && ! $is_top_secondary_item && $is_parent ) { 495 $arrow_right = '<span class="wp-admin-bar-arrow-right" aria-hidden="true"></span>'; 496 } 497 491 498 if ( ! empty( $node->meta['class'] ) ) 492 499 $menuclass .= $node->meta['class']; 493 500 … … 532 539 ?>><?php 533 540 endif; 534 541 535 echo $ node->title;542 echo $arrow_right . $node->title; 536 543 537 544 if ( $has_link ) : 538 545 ?></a><?php -
src/wp-includes/css/admin-bar.css
234 234 235 235 #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, 236 236 #wpadminbar .ab-icon, 237 #wpadminbar .ab-item:before { 237 #wpadminbar .ab-item:before, 238 .wp-admin-bar-arrow-right { 238 239 position: relative; 239 240 float: left; 240 241 font: normal 20px/1 dashicons; … … 312 313 color: #00b9eb; 313 314 } 314 315 315 #wpadminbar .menupop .menupop > .ab-item :before,316 #wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow-right:before, 316 317 #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { 317 318 position: absolute; 318 319 font: normal 17px/1 dashicons; … … 326 327 padding-right: 2em; 327 328 } 328 329 329 #wpadminbar .menupop .menupop > .ab-item :before {330 #wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow-right:before { 330 331 top: 1px; 331 right: 4px; 332 right: 10px; 333 padding: 4px 0; 332 334 content: "\f139"; 333 335 color: inherit; 334 336 }