Ticket #22059: responsive-admin-bar.patch
File responsive-admin-bar.patch, 5.6 KB (added by , 11 years ago) |
---|
-
wp-includes/admin-bar.php
231 231 if ( $title != $blogname ) 232 232 $title = trim( $title ) . '…'; 233 233 234 $title = '<span class="ab-icon"></span><span class="ab-label">'.$title.'</span>'; 235 234 236 $wp_admin_bar->add_menu( array( 235 237 'id' => 'site-name', 236 238 'title' => $title, … … 287 289 if ( count( $wp_admin_bar->user->blogs ) < 1 && ! is_super_admin() ) 288 290 return; 289 291 292 $title = '<span class="ab-icon"></span><span class="ab-label">' . _x( 'My Sites', 'admin bar menu group label' ) . '</span>'; 293 290 294 $wp_admin_bar->add_menu( array( 291 295 'id' => 'my-sites', 292 'title' => __( 'My Sites' ),296 'title' => $title, 293 297 'href' => admin_url( 'my-sites.php' ), 294 298 ) ); 295 299 … … 369 373 $wp_admin_bar->add_menu( array( 370 374 'parent' => $menu_id, 371 375 'id' => $menu_id . '-n', 372 'title' => __( 'New Post' ), 376 'title' => __( 'New Post' ), 373 377 'href' => admin_url( 'post-new.php' ), 374 378 ) ); 375 379 $wp_admin_bar->add_menu( array( … … 421 425 function wp_admin_bar_edit_menu( $wp_admin_bar ) { 422 426 global $tag, $wp_the_query; 423 427 428 $html_before = '<span class="ab-icon"></span><span class="ab-label">'; 429 $html_after = '</span>'; 430 424 431 if ( is_admin() ) { 425 432 $current_screen = get_current_screen(); 426 433 $post = get_post(); 427 434 428 435 if ( 'post' == $current_screen->base 429 436 && 'add' != $current_screen->action 430 437 && ( $post_type_object = get_post_type_object( $post->post_type ) ) … … 434 441 { 435 442 $wp_admin_bar->add_menu( array( 436 443 'id' => 'view', 437 'title' => $ post_type_object->labels->view_item,444 'title' => $html_before . $post_type_object->labels->view_item . $html_after, 438 445 'href' => get_permalink( $post->ID ) 439 446 ) ); 440 447 } elseif ( 'edit-tags' == $current_screen->base … … 444 451 { 445 452 $wp_admin_bar->add_menu( array( 446 453 'id' => 'view', 447 'title' => $ tax->labels->view_item,454 'title' => $html_before . $tax->labels->view_item . $html_after, 448 455 'href' => get_term_link( $tag ) 449 456 ) ); 450 457 } … … 461 468 { 462 469 $wp_admin_bar->add_menu( array( 463 470 'id' => 'edit', 464 'title' => $ post_type_object->labels->edit_item,471 'title' => $html_before . $post_type_object->labels->edit_item . $html_after, 465 472 'href' => get_edit_post_link( $current_object->ID ) 466 473 ) ); 467 474 } elseif ( ! empty( $current_object->taxonomy ) … … 471 478 { 472 479 $wp_admin_bar->add_menu( array( 473 480 'id' => 'edit', 474 'title' => $ tax->labels->edit_item,481 'title' => $html_before . $tax->labels->edit_item . $html_after, 475 482 'href' => get_edit_term_link( $current_object->term_id, $current_object->taxonomy ) 476 483 ) ); 477 484 } -
wp-includes/css/admin-bar.css
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
642 642 * html #wpadminbar .menupop a span { 643 643 background-image: none; 644 644 } 645 646 /** 647 * Response admin bar 648 */ 649 650 #wp-admin-bar-my-sites .ab-icon, 651 #wp-admin-bar-site-name .ab-icon, 652 #wp-admin-bar-edit .ab-icon, 653 #wp-admin-bar-view .ab-icon { 654 display:none; 655 } 656 657 @media (max-width: 900px) { 658 659 #wpadminbar { 660 min-width: 600px; 661 } 662 663 #wp-admin-bar-new-content .ab-label, 664 #wp-admin-bar-search { 665 display: none; 666 } 667 668 #wp-admin-bar-my-account>.ab-item, 669 #wp-admin-bar-my-sites>.ab-item, 670 #wp-admin-bar-site-name>.ab-item, 671 #wp-admin-bar-edit>.ab-item, 672 #wp-admin-bar-view>.ab-item { 673 font-size: 0; 674 overflow:hidden; 675 } 676 677 /* user + avatar */ 678 #wp-admin-bar-my-account .ab-item { 679 padding-left:6px !important; 680 } 681 682 #wp-admin-bar-edit>.ab-item, 683 #wp-admin-bar-view>.ab-item, 684 #wp-admin-bar-my-sites>.ab-item, 685 #wp-admin-bar-site-name>.ab-item { 686 padding: 0 10px !important; 687 width: 20px; 688 } 689 690 /* my sites */ 691 #wp-admin-bar-my-sites .ab-item .ab-icon { 692 display:block; 693 background-image: url(../images/admin-bar-sprite.png?d=20120830); 694 background-position:-1px -263px; 695 background-repeat: no-repeat; 696 } 697 #wp-admin-bar-my-sites .ab-item:hover .ab-icon, 698 #wp-admin-bar-my-sites.hover .ab-item .ab-icon { 699 background-position:-1px -283px; 700 } 701 702 /* site name */ 703 #wp-admin-bar-site-name .ab-item .ab-icon { 704 display: block; 705 background-image: url(../images/admin-bar-sprite.png?d=20120830); 706 background-position: -1px -223px; 707 background-repeat: no-repeat; 708 } 709 #wp-admin-bar-site-name .ab-item:hover .ab-icon, 710 #wp-admin-bar-site-name.hover .ab-item .ab-icon { 711 background-position: -1px -243px; 712 } 713 714 /* edit post */ 715 #wp-admin-bar-edit .ab-item .ab-icon { 716 display: block; 717 background-image: url(../images/admin-bar-sprite.png?d=20120830); 718 background-position: -1px -303px; 719 background-repeat: no-repeat; 720 } 721 /* view post */ 722 #wp-admin-bar-view .ab-item .ab-icon { 723 display: block; 724 background-image: url(../images/admin-bar-sprite.png?d=20120830); 725 background-position: -1px -303px; 726 background-repeat: no-repeat; 727 } 728 729 } 730 No newline at end of file