WordPress.org

Make WordPress Core

Changeset 19230


Ignore:
Timestamp:
11/09/11 19:12:48 (4 years ago)
Author:
koopersmith
Message:

Add secondary flag to admin bar. fixes #19136.

Location:
trunk/wp-includes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r19214 r19230  
    9292    } 
    9393 
    94     // Add secondary menu. 
    95     $wp_admin_bar->add_menu( array( 
    96         'parent' => 'wp-logo', 
    97         'id'     => 'wp-logo-secondary', 
    98         'title'  => ' ', 
    99         'meta'   => array( 
    100             'class' => 'secondary', 
    101         ), 
    102     ) ); 
    103  
    10494    // Add WordPress.org link 
    10595    $wp_admin_bar->add_menu( array( 
    106         'parent' => 'wp-logo-secondary', 
    107         'id'     => 'wporg', 
    108         'title'  => __('WordPress.org'), 
    109         'href'   => __('http://wordpress.org'), 
     96        'parent'    => 'wp-logo', 
     97        'secondary' => true, 
     98        'id'        => 'wporg', 
     99        'title'     => __('WordPress.org'), 
     100        'href'      => __('http://wordpress.org'), 
    110101    ) ); 
    111102 
    112103    // Add codex link 
    113104    $wp_admin_bar->add_menu( array( 
    114         'parent' => 'wp-logo-secondary', 
    115         'id'     => 'documentation', 
    116         'title'  => __('Documentation'), 
    117         'href'   => __('http://codex.wordpress.org'), 
     105        'parent'    => 'wp-logo', 
     106        'secondary' => true, 
     107        'id'        => 'documentation', 
     108        'title'     => __('Documentation'), 
     109        'href'      => __('http://codex.wordpress.org'), 
    118110    ) ); 
    119111 
    120112    // Add forums link 
    121113    $wp_admin_bar->add_menu( array( 
    122         'parent' => 'wp-logo-secondary', 
    123         'id'     => 'support-forums', 
    124         'title'  => __('Support Forums'), 
    125         'href'   => __('http://wordpress.org/support/'), 
     114        'parent'    => 'wp-logo', 
     115        'secondary' => true, 
     116        'id'        => 'support-forums', 
     117        'title'     => __('Support Forums'), 
     118        'href'      => __('http://wordpress.org/support/'), 
    126119    ) ); 
    127120 
    128121    // Add feedback link 
    129122    $wp_admin_bar->add_menu( array( 
    130         'parent' => 'wp-logo-secondary', 
    131         'id'     => 'feedback', 
    132         'title'  => __('Feedback'), 
    133         'href'   => __('http://wordpress.org/support/forum/requests-and-feedback'), 
     123        'parent'    => 'wp-logo', 
     124        'secondary' => true, 
     125        'id'        => 'feedback', 
     126        'title'     => __('Feedback'), 
     127        'href'      => __('http://wordpress.org/support/forum/requests-and-feedback'), 
    134128    ) ); 
    135129} 
     
    151145        $avatar = get_avatar( $user_id, 28 ); 
    152146        $howdy  = sprintf( __('Howdy, %1$s'), $user_identity ); 
    153         $class  = 'opposite'; 
    154  
    155         if ( ! empty( $avatar ) ) 
    156             $class .= ' with-avatar'; 
    157  
    158         $wp_admin_bar->add_menu( array( 
    159             'id'    => 'my-account', 
    160             'title' => $howdy . $avatar, 
    161             'href'  => $profile_url, 
    162             'meta'  => array( 
    163                 'class' => $class, 
     147        $class  = empty( $avatar ) ? '' : 'with-avatar'; 
     148 
     149        $wp_admin_bar->add_menu( array( 
     150            'id'        => 'my-account', 
     151            'secondary' => true, 
     152            'title'     => $howdy . $avatar, 
     153            'href'      => $profile_url, 
     154            'meta'      => array( 
     155                'class'     => $class, 
    164156            ), 
    165157        ) ); 
     
    323315    } 
    324316 
    325     if ( $wp_admin_bar->user->blogs ) { 
    326         $wp_admin_bar->add_menu( array( 
    327             'parent' => 'my-sites', 
    328             'id'     => 'my-sites-secondary', 
    329             'title'  => ' ', 
    330             'meta'   => array( 
    331                 'class' => 'secondary', 
    332             ), 
    333         ) ); 
    334     } 
    335  
    336317    // Add blog links 
    337318    $blue_wp_logo_url = includes_url('images/wpmini-blue.png'); 
     
    346327 
    347328        $wp_admin_bar->add_menu( array( 
    348             'parent' => 'my-sites-secondary', 
    349             'id'     => $menu_id, 
    350             'title'  => $blavatar . $blogname, 
    351             'href'   => get_admin_url( $blog->userblog_id ), 
     329            'parent'    => 'my-sites', 
     330            'secondary' => true, 
     331            'id'        => $menu_id, 
     332            'title'     => $blavatar . $blogname, 
     333            'href'      => get_admin_url( $blog->userblog_id ), 
    352334        ) ); 
    353335 
     
    474456 */ 
    475457function wp_admin_bar_new_content_menu( $wp_admin_bar ) { 
    476     $primary = $secondary = array(); 
     458    $actions = array(); 
    477459 
    478460    $cpts = (array) get_post_types( array( 'show_in_admin_bar' => true ), 'objects' ); 
    479461 
    480462    if ( isset( $cpts['post'] ) && current_user_can( $cpts['post']->cap->edit_posts ) ) { 
    481         $primary[ 'post-new.php' ] = array( $cpts['post']->labels->name_admin_bar, 'new-post' ); 
     463        $actions[ 'post-new.php' ] = array( $cpts['post']->labels->name_admin_bar, 'new-post' ); 
    482464        unset( $cpts['post'] ); 
    483465    } 
    484466 
    485467    if ( current_user_can( 'upload_files' ) ) 
    486         $primary[ 'media-new.php' ] = array( _x( 'Media', 'add new from admin bar' ), 'new-media' ); 
     468        $actions[ 'media-new.php' ] = array( _x( 'Media', 'add new from admin bar' ), 'new-media' ); 
    487469 
    488470    if ( current_user_can( 'manage_links' ) ) 
    489         $primary[ 'link-add.php' ] = array( _x( 'Link', 'add new from admin bar' ), 'new-link' ); 
     471        $actions[ 'link-add.php' ] = array( _x( 'Link', 'add new from admin bar' ), 'new-link' ); 
    490472 
    491473    if ( isset( $cpts['page'] ) && current_user_can( $cpts['page']->cap->edit_posts ) ) { 
    492         $primary[ 'post-new.php?post_type=page' ] = array( $cpts['page']->labels->name_admin_bar, 'new-page' ); 
     474        $actions[ 'post-new.php?post_type=page' ] = array( $cpts['page']->labels->name_admin_bar, 'new-page' ); 
    493475        unset( $cpts['page'] ); 
    494476    } 
     
    500482 
    501483        $key = 'post-new.php?post_type=' . $cpt->name; 
    502         $primary[ $key ] = array( $cpt->labels->name_admin_bar, 'new-' . $cpt->name ); 
     484        $actions[ $key ] = array( $cpt->labels->name_admin_bar, 'new-' . $cpt->name ); 
    503485    } 
    504486 
    505487    if ( current_user_can( 'create_users' ) || current_user_can( 'promote_users' ) ) 
    506         $secondary[ 'user-new.php' ] = array( _x( 'User', 'add new from admin bar' ), 'new-user' ); 
    507  
    508     if ( ! $primary && ! $secondary ) 
     488        $actions[ 'user-new.php' ] = array( _x( 'User', 'add new from admin bar' ), 'new-user', true ); 
     489 
     490    if ( ! $actions ) 
    509491        return; 
    510492 
     
    512494        'id'    => 'new-content', 
    513495        'title' => _x( 'Add New', 'admin bar menu group label' ), 
    514         'href'  => admin_url( current( array_keys( $primary ) ) ), 
    515     ) ); 
    516  
    517     $items = array( 
    518         'new-content' => $primary, 
    519         'new-content-secondary' => $secondary, 
    520     ); 
    521  
    522     foreach ( $items as $parent => $actions ) { 
    523  
    524         if ( ! empty( $actions ) && $parent == 'new-content-secondary' ) { 
    525             $wp_admin_bar->add_menu( array( 
    526                 'parent' => 'new-content', 
    527                 'id'     => 'new-content-secondary', 
    528                 'title'  => ' ', 
    529                 'meta'   => array( 
    530                     'class' => 'secondary', 
    531                 ), 
    532             ) ); 
    533         } 
    534  
    535         foreach ( $actions as $link => $action ) { 
    536             $wp_admin_bar->add_menu( array( 
    537                 'parent' => $parent, 
    538                 'id'     => $action[1], 
    539                 'title'  => $action[0], 
    540                 'href'   => admin_url( $link ) 
    541             ) ); 
    542         } 
     496        'href'  => admin_url( current( array_keys( $actions ) ) ), 
     497    ) ); 
     498 
     499    foreach ( $actions as $link => $action ) { 
     500        list( $title, $id ) = $action; 
     501        $secondary = ! empty( $action[2] ); 
     502 
     503        $wp_admin_bar->add_menu( array( 
     504            'parent'    => 'new-content', 
     505            'secondary' => $secondary, 
     506            'id'        => $id, 
     507            'title'     => $title, 
     508            'href'      => admin_url( $link ) 
     509        ) ); 
    543510    } 
    544511} 
  • trunk/wp-includes/class-wp-admin-bar.php

    r19207 r19230  
    1313 
    1414        $this->user = new stdClass; 
     15        $this->root = new stdClass; 
     16        $this->root->children  = (object) array( 
     17            'primary'   => array(), 
     18            'secondary' => array(), 
     19        ); 
    1520 
    1621        if ( is_user_logged_in() ) { 
     
    6065     * 
    6166     * @param array $args - The arguments for each node. 
    62      * - id       - string - The ID of the item. 
    63      * - title    - string - The title of the node. 
    64      * - parent   - string - The ID of the parent node. Optional. 
    65      * - href     - string - The link for the item. Optional. 
    66      * - meta     - array  - Meta data including the following keys: html, class, onclick, target, title. 
     67     * - id         - string    - The ID of the item. 
     68     * - title      - string    - The title of the node. 
     69     * - parent     - string    - The ID of the parent node. Optional. 
     70     * - href       - string    - The link for the item. Optional. 
     71     * - secondary  - boolean   - If the item should be part of a secondary menu. Optional. Default false. 
     72     * - meta       - array     - Meta data including the following keys: html, class, onclick, target, title. 
    6773     */ 
    6874    public function add_node( $args ) { 
     
    8187 
    8288        $defaults = array( 
    83             'id'       => false, 
    84             'title'    => false, 
    85             'parent'   => false, 
    86             'href'     => false, 
    87             'meta'     => array(), 
     89            'id'        => false, 
     90            'title'     => false, 
     91            'parent'    => false, 
     92            'href'      => false, 
     93            'secondary' => false, 
     94            'meta'      => array(), 
    8895        ); 
    8996 
     
    93100 
    94101        $args = wp_parse_args( $args, $defaults ); 
     102        $args['children'] = (object) array( 
     103            'primary'   => array(), 
     104            'secondary' => array(), 
     105        ); 
    95106 
    96107        $this->nodes[ $args['id'] ] = (object) $args; 
     
    107118            // Handle root menu items 
    108119            if ( empty( $node->parent ) ) { 
    109                 $this->root[] = $node; 
     120                $parent = $this->root; 
     121 
     122            // If the parent node isn't registered, ignore the node. 
     123            } elseif ( ! isset( $this->nodes[ $node->parent ] ) ) { 
    110124                continue; 
     125 
     126            } else { 
     127                $parent = $this->nodes[ $node->parent ]; 
    111128            } 
    112129 
    113             // If the parent node isn't registered, ignore the node. 
    114             if ( ! isset( $this->nodes[ $node->parent ] ) ) 
    115                 continue; 
    116  
    117             $parent = $this->nodes[ $node->parent ]; 
    118             if ( ! isset( $parent->children ) ) 
    119                 $parent->children = array(); 
    120  
    121             $parent->children[] = $node; 
     130            if ( $node->secondary ) 
     131                $parent->children->secondary[] = $node; 
     132            else 
     133                $parent->children->primary[] = $node; 
    122134        } 
    123135 
     
    127139                <ul class="ab-top-menu"><?php 
    128140 
    129                     foreach ( $this->root as $node ) { 
     141                    foreach ( $this->root->children->primary as $node ) { 
    130142                        $this->recursive_render( $node ); 
    131143                    } 
    132144 
     145                    if ( ! empty( $this->root->children->secondary ) ): 
     146                        ?><ul class="top-secondary"><?php 
     147 
     148                            foreach ( $this->root->children->secondary as $node ) { 
     149                                $this->recursive_render( $node ); 
     150                            } 
     151 
     152                        ?></ul><?php 
     153                    endif; 
    133154                ?></ul> 
    134155            </div> 
     
    139160 
    140161    function recursive_render( $node ) { 
    141         $is_parent = ! empty( $node->children ); 
     162        $is_parent = ! empty( $node->children->primary ); 
    142163 
    143164        $menuclass = $is_parent ? 'menupop' : ''; 
     
    174195            ?></a> 
    175196 
    176             <?php if ( $is_parent ) : ?> 
    177                 <ul><?php 
    178  
    179                 // Render children. 
    180                 foreach ( $node->children as $child_node ) { 
     197            <?php 
     198            if ( $is_parent ) : 
     199                ?><ul><?php 
     200                foreach ( $node->children->primary as $child_node ) { 
    181201                    $this->recursive_render( $child_node ); 
    182202                } 
    183203 
    184                 ?></ul> 
    185             <?php endif; 
     204                if ( ! empty( $node->children->secondary ) ): 
     205                    ?><ul class="sub-secondary"><?php 
     206                    foreach ( $node->children->secondary as $child_node ) { 
     207                        $this->recursive_render( $child_node ); 
     208                    } 
     209                    ?></ul><?php 
     210                endif; 
     211                ?></ul><?php 
     212            endif; 
    186213 
    187214            if ( ! empty( $node->meta['html'] ) ) 
  • trunk/wp-includes/css/admin-bar.css

    r19221 r19230  
    1 #wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-transform:none;letter-spacing:normal;line-height:1;font:normal 13px/28px sans-serif;color:#ccc;text-shadow:#444 0 -1px 0;}#wpadminbar ul li:before,#wpadminbar ul li:after{content:normal;}#wpadminbar a,#wpadminbar a:hover,#wpadminbar a img,#wpadminbar a img:hover{outline:none;border:none;text-decoration:none;background:none;}#wpadminbar{direction:ltr;color:#ccc;font:normal 13px/28px sans-serif;height:28px;position:fixed;top:0;left:0;width:100%;z-index:99999;min-width:960px;background-color:#464646;background-image:-ms-linear-gradient(bottom,#373737,#464646 5px);background-image:-moz-linear-gradient(bottom,#373737,#464646 5px);background-image:-o-linear-gradient(bottom,#373737,#464646 5px);background-image:-webkit-gradient(linear,left bottom,left top,from(#373737),to(#464646));background-image:-webkit-linear-gradient(bottom,#373737,#464646 5px);background-image:linear-gradient(bottom,#373737,#464646 5px);}#wpadminbar ul,#wpadminbar ul li{background:none;list-style:none;margin:0;padding:0;position:relative;z-index:99999;}#wpadminbar .quicklinks{border-left:1px solid transparent;}#wpadminbar .quicklinks ul{text-align:left;}#wpadminbar li{float:left;}#wpadminbar .quicklinks>ul>li{border-right:1px solid #555;}#wpadminbar .quicklinks>ul>li>a{border-right:1px solid #333;}#wpadminbar .quicklinks>ul>li.opposite{border-left:1px solid #333;border-right:0;}#wpadminbar .quicklinks>ul>li.opposite>a{border-left:1px solid #555;border-right:0;}#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:28px;display:block;padding:0 1em;margin:0;}#wpadminbar .quicklinks a>span{line-height:28px;}#wpadminbar .quicklinks .menupop ul,#wpadminbar .shortlink-input{margin:0 0 0 -1px;padding-top:6px;padding-bottom:6px;-moz-box-shadow:0 4px 6px rgba(0,0,0,0.2);-webkit-box-shadow:0 4px 6px rgba(0,0,0,0.2);box-shadow:0 4px 6px rgba(0,0,0,0.2);background:#fff;display:none;position:absolute;float:none;border-width:0 1px 1px 1px;border-style:solid;border-color:#dfdfdf;}#wpadminbar .quicklinks .opposite.menupop ul{right:0;margin:0 -1px 0 0;}#wpadminbar .selected .shortlink-input{display:block;}#wpadminbar .quicklinks .menupop ul li{float:none;}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:bold;}#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a span,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar .quicklinks .menupop.hover ul li a span,#wpadminbar.nojs .quicklinks .menupop:hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a span,#wpadminbar .shortlink-input{line-height:26px;height:26px;color:#21759B;text-shadow:none;white-space:nowrap;min-width:140px;}#wpadminbar .shortlink-input{width:200px;}#wpadminbar.nojs .quicklinks li:hover>ul,#wpadminbar .quicklinks li.hover>ul{display:block;}#wpadminbar .quicklinks .menupop li:hover>ul,#wpadminbar .quicklinks .menupop li.hover>ul{margin-left:100%;margin-top:-33px;border-width:1px;}#wpadminbar .quicklinks .opposite.menupop li:hover>ul,#wpadminbar .quicklinks .opposite.menupop li.hover>ul{margin-left:0;left:inherit;right:100%;}#wpadminbar .ab-top-menu>li:hover,#wpadminbar .ab-top-menu>li>a:focus{background:#3a3a3a;background-image:-ms-linear-gradient(bottom,#3a3a3a,#222);background-image:-moz-linear-gradient(bottom,#3a3a3a,#222);background-image:-o-linear-gradient(bottom,#3a3a3a,#222);background-image:-webkit-gradient(linear,left bottom,left top,from(#3a3a3a),to(#222));background-image:-webkit-linear-gradient(bottom,#3a3a3a,#222);background-image:linear-gradient(bottom,#3a3a3a,#222);}#wpadminbar.nojs .ab-top-menu>li.menupop:hover,#wpadminbar .ab-top-menu li.menupop.hover,#wpadminbar .quicklinks .menupop>a:focus{background:#fff;}#wpadminbar.nojs .quicklinks .menupop:hover a,#wpadminbar.nojs .quicklinks .menupop:hover span,#wpadminbar .quicklinks .menupop.hover a,#wpadminbar .quicklinks .menupop.hover span,#wpadminbar .quicklinks .menupop a:focus,#wpadminbar .quicklinks .menupop a:focus span{color:#333;text-shadow:none;}#wpadminbar .quicklinks .menupop li:hover,#wpadminbar .quicklinks .menupop li.hover,#wpadminbar .quicklinks .menupop a:focus{background-color:#eaf2fa;}#wpadminbar .quicklinks .menupop>a:focus{background-color:#fff;}#wpadminbar .ab-top-menu>.menupop>a span{white-space:nowrap;}#wpadminbar .ab-top-menu>li>a:hover,#wpadminbar .ab-top-menu>li>a:hover span,#wpadminbar .ab-top-menu>li>a:focus,#wpadminbar .ab-top-menu>li>a:focus span{color:#fafafa;}#wpadminbar.nojs .ab-top-menu>li>a:hover span,#wpadminbar .ab-top-menu>li.hover>a:hover span{background:none;}#wpadminbar .menupop li a>span{display:block;background:url(../images/admin-bar-sprite.png?d=11122010) right -31px no-repeat;padding:0 1.5em 0 0;}#wpadminbar .opposite.menupop li a>span{background-position:-28px -31px;padding:0 0 0 1.5em;}#wpadminbar .quicklinks .menupop .secondary{background:#eee;margin:6px 0 -6px;border-top:1px solid #dfdfdf;}#wpadminbar .quicklinks .menupop .secondary>a{display:none;}#wpadminbar .quicklinks .menupop li.secondary>ul,#wpadminbar .quicklinks .opposite.menupop li.secondary>ul{display:block;position:relative;right:auto;margin:0;border:0;background:#eee;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;}#wpadminbar .quicklinks .menupop li.secondary>ul>li:hover,#wpadminbar .quicklinks .menupop li.secondary>ul>li.hover,#wpadminbar .quicklinks .menupop li.secondary>ul>li a:focus{background:#dfdfdf;}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#333;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:bold;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000;}#wpadminbar li.opposite{float:right;}#wpadminbar ul li:last-child,#wpadminbar ul li:last-child a{border-right:0;}#wp-admin-bar-my-account>ul{min-width:270px;}#wpadminbar #wp-admin-bar-my-account .user-info-item{margin-left:88px;margin-right:16px;}#wpadminbar #wp-admin-bar-my-account .user-info-item>a{padding-left:8px;}#wpadminbar #wp-admin-bar-my-account .user-info{margin-top:6px;margin-bottom:15px;height:auto;background:none;}#wp-admin-bar-my-account .user-info .avatar{position:absolute;left:-72px;top:4px;}#wpadminbar #wp-admin-bar-my-account .user-info a{height:auto;}#wpadminbar #wp-admin-bar-my-account .user-info span{background:none;padding:0;height:18px;}#wpadminbar #wp-admin-bar-my-account .user-info .display-name{color:#333;}#wpadminbar #wp-admin-bar-my-account .user-info .username{color:#999;font-size:11px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{width:16px;height:16px;border:1px solid #999;padding:0;background:#eee;line-height:24px;vertical-align:middle;margin:-2px 0 0 6px;float:none;}#wpadminbar .quicklinks li img.blavatar{vertical-align:middle;margin:-3px 4px 0 0;padding:0;}#wpadminbar #wp-admin-bar-search a{padding:0;}#wpadminbar .quicklinks .admin-bar-search:hover{background:transparent;}#wpadminbar #adminbarsearch{float:right;height:24px;padding:2px 4px;margin:0;}#wpadminbar #adminbarsearch .adminbar-input{height:23px;width:140px;float:left;font:13px sans-serif;border:none;padding:0 3px 0 24px;margin:0 3px 0 0;color:#ccc;text-shadow:#444 0 -1px 0;background-color:rgba(255,255,255,0);background-image:url('../images/admin-bar-search.png');background-repeat:no-repeat;background-position:4px 2px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-transition-duration:400ms;-webkit-transition-property:width,background;-webkit-transition-timing-function:ease;-moz-transition-duration:400ms;-moz-transition-property:width,background;-moz-transition-timing-function:ease;-o-transition-duration:400ms;-o-transition-property:width,background;-o-transition-timing-function:ease;}#wpadminbar #adminbarsearch .adminbar-input:focus{color:#555;text-shadow:0 1px 0 #fff;width:200px;background-color:rgba(255,255,255,0.9);}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-button{display:none;}#wpadminbar .wp-admin-bar-logo>a{padding-left:24px;background:url(../images/wp-logo-white.png) no-repeat 13px 6px;}#wpadminbar .wp-admin-bar-logo>a span{height:28px;}#wpadminbar.nojs .wp-admin-bar-logo:hover>a,#wpadminbar .wp-admin-bar-logo.hover>a,#wpadminbar .quicklinks .wp-admin-bar-logo>a:focus{background:url(../images/wp-logo-dark.png) no-repeat 12px 6px;}#wpadminbar .ab-comments-icon{position:relative;padding-top:5px;float:left;}#wpadminbar .ab-comments-icon-body{margin-top:3px;background:#999;height:10px;width:14px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar a:hover .ab-comments-icon-body{background:#bbb;color:#555;}#wpadminbar a .ab-comments-icon-arrow{height:0;position:absolute;bottom:-3px;left:3px;border-left:4px solid #999;border-bottom:4px solid transparent;}#wpadminbar a:hover .ab-comments-icon-arrow{border-left-color:#bbb;}#wpadminbar #ab-awaiting-mod{margin-left:4px;}#wpadminbar span.count-0{display:none;}* html #wpadminbar{overflow:hidden;position:absolute;}* html #wpadminbar .quicklinks ul li a{float:left;}* html #wpadminbar .menupop a span{background-image:none;} 
     1#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-transform:none;letter-spacing:normal;line-height:1;font:normal 13px/28px sans-serif;color:#ccc;text-shadow:#444 0 -1px 0;}#wpadminbar ul li:before,#wpadminbar ul li:after{content:normal;}#wpadminbar a,#wpadminbar a:hover,#wpadminbar a img,#wpadminbar a img:hover{outline:none;border:none;text-decoration:none;background:none;}#wpadminbar{direction:ltr;color:#ccc;font:normal 13px/28px sans-serif;height:28px;position:fixed;top:0;left:0;width:100%;z-index:99999;min-width:960px;background-color:#464646;background-image:-ms-linear-gradient(bottom,#373737,#464646 5px);background-image:-moz-linear-gradient(bottom,#373737,#464646 5px);background-image:-o-linear-gradient(bottom,#373737,#464646 5px);background-image:-webkit-gradient(linear,left bottom,left top,from(#373737),to(#464646));background-image:-webkit-linear-gradient(bottom,#373737,#464646 5px);background-image:linear-gradient(bottom,#373737,#464646 5px);}#wpadminbar ul,#wpadminbar ul li{background:none;list-style:none;margin:0;padding:0;position:relative;z-index:99999;}#wpadminbar .quicklinks{border-left:1px solid transparent;}#wpadminbar .quicklinks ul{text-align:left;}#wpadminbar li{float:left;}#wpadminbar .quicklinks>ul>li{border-right:1px solid #555;}#wpadminbar .quicklinks>ul>li>a{border-right:1px solid #333;}#wpadminbar .quicklinks .top-secondary>li{border-left:1px solid #333;border-right:0;float:right;}#wpadminbar .quicklinks .top-secondary>li>a{border-left:1px solid #555;border-right:0;}#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:28px;display:block;padding:0 1em;margin:0;}#wpadminbar .quicklinks a>span{line-height:28px;}#wpadminbar .quicklinks .menupop ul,#wpadminbar .shortlink-input{margin:0 0 0 -1px;padding-top:6px;padding-bottom:6px;-moz-box-shadow:0 4px 6px rgba(0,0,0,0.2);-webkit-box-shadow:0 4px 6px rgba(0,0,0,0.2);box-shadow:0 4px 6px rgba(0,0,0,0.2);background:#fff;display:none;position:absolute;float:none;border-width:0 1px 1px 1px;border-style:solid;border-color:#dfdfdf;}#wpadminbar .quicklinks .top-secondary .menupop ul{right:0;margin:0 -1px 0 0;}#wpadminbar .selected .shortlink-input{display:block;}#wpadminbar .quicklinks .menupop ul li{float:none;}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:bold;}#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a span,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar .quicklinks .menupop.hover ul li a span,#wpadminbar.nojs .quicklinks .menupop:hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a span,#wpadminbar .shortlink-input{line-height:26px;height:26px;color:#21759B;text-shadow:none;white-space:nowrap;min-width:140px;}#wpadminbar .shortlink-input{width:200px;}#wpadminbar.nojs .quicklinks li:hover>ul,#wpadminbar .quicklinks li.hover>ul{display:block;}#wpadminbar .quicklinks .menupop li:hover>ul,#wpadminbar .quicklinks .menupop li.hover>ul{margin-left:100%;margin-top:-33px;border-width:1px;}#wpadminbar .quicklinks .top-secondary .menupop li:hover>ul,#wpadminbar .quicklinks .top-secondary .menupop li.hover>ul{margin-left:0;left:inherit;right:100%;}#wpadminbar .ab-top-menu>li:hover,#wpadminbar .ab-top-menu>li>a:focus{background:#3a3a3a;background-image:-ms-linear-gradient(bottom,#3a3a3a,#222);background-image:-moz-linear-gradient(bottom,#3a3a3a,#222);background-image:-o-linear-gradient(bottom,#3a3a3a,#222);background-image:-webkit-gradient(linear,left bottom,left top,from(#3a3a3a),to(#222));background-image:-webkit-linear-gradient(bottom,#3a3a3a,#222);background-image:linear-gradient(bottom,#3a3a3a,#222);}#wpadminbar.nojs .ab-top-menu>li.menupop:hover,#wpadminbar .ab-top-menu li.menupop.hover,#wpadminbar .quicklinks .menupop>a:focus{background:#fff;}#wpadminbar.nojs .quicklinks .menupop:hover a,#wpadminbar.nojs .quicklinks .menupop:hover span,#wpadminbar .quicklinks .menupop.hover a,#wpadminbar .quicklinks .menupop.hover span,#wpadminbar .quicklinks .menupop a:focus,#wpadminbar .quicklinks .menupop a:focus span{color:#333;text-shadow:none;}#wpadminbar .quicklinks .menupop li:hover,#wpadminbar .quicklinks .menupop li.hover,#wpadminbar .quicklinks .menupop a:focus{background-color:#eaf2fa;}#wpadminbar .quicklinks .menupop>a:focus{background-color:#fff;}#wpadminbar .ab-top-menu>.menupop>a span{white-space:nowrap;}#wpadminbar .ab-top-menu>li>a:hover,#wpadminbar .ab-top-menu>li>a:hover span,#wpadminbar .ab-top-menu>li>a:focus,#wpadminbar .ab-top-menu>li>a:focus span{color:#fafafa;}#wpadminbar.nojs .ab-top-menu>li>a:hover span,#wpadminbar .ab-top-menu>li.hover>a:hover span{background:none;}#wpadminbar .menupop li a>span{display:block;background:url(../images/admin-bar-sprite.png?d=11122010) right -31px no-repeat;padding:0 1.5em 0 0;}#wpadminbar .top-secondary .menupop li a>span{background-position:-28px -31px;padding:0 0 0 1.5em;}#wpadminbar .quicklinks .menupop ul.sub-secondary{display:block;position:relative;right:auto;margin:0;border:0;background:#eee;margin:6px 0 -6px;border-top:1px solid #dfdfdf;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;}#wpadminbar .quicklinks .menupop .sub-secondary>li:hover,#wpadminbar .quicklinks .menupop .sub-secondary>li.hover,#wpadminbar .quicklinks .menupop .sub-secondary>li a:focus{background:#dfdfdf;}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#333;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:bold;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000;}#wpadminbar .top-secondary{float:right;}#wpadminbar ul li:last-child,#wpadminbar ul li:last-child a{border-right:0;}#wp-admin-bar-my-account>ul{min-width:270px;}#wpadminbar #wp-admin-bar-my-account .user-info-item{margin-left:88px;margin-right:16px;}#wpadminbar #wp-admin-bar-my-account .user-info-item>a{padding-left:8px;}#wpadminbar #wp-admin-bar-my-account .user-info{margin-top:6px;margin-bottom:15px;height:auto;background:none;}#wp-admin-bar-my-account .user-info .avatar{position:absolute;left:-72px;top:4px;}#wpadminbar #wp-admin-bar-my-account .user-info a{height:auto;}#wpadminbar #wp-admin-bar-my-account .user-info span{background:none;padding:0;height:18px;}#wpadminbar #wp-admin-bar-my-account .user-info .display-name{color:#333;}#wpadminbar #wp-admin-bar-my-account .user-info .username{color:#999;font-size:11px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{width:16px;height:16px;border:1px solid #999;padding:0;background:#eee;line-height:24px;vertical-align:middle;margin:-2px 0 0 6px;float:none;}#wpadminbar .quicklinks li img.blavatar{vertical-align:middle;margin:-3px 4px 0 0;padding:0;}#wpadminbar #wp-admin-bar-search a{padding:0;}#wpadminbar .quicklinks .admin-bar-search:hover{background:transparent;}#wpadminbar #adminbarsearch{float:right;height:24px;padding:2px 4px;margin:0;}#wpadminbar #adminbarsearch .adminbar-input{height:23px;width:140px;float:left;font:13px sans-serif;border:none;padding:0 3px 0 24px;margin:0 3px 0 0;color:#ccc;text-shadow:#444 0 -1px 0;background-color:rgba(255,255,255,0);background-image:url('../images/admin-bar-search.png');background-repeat:no-repeat;background-position:4px 2px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-transition-duration:400ms;-webkit-transition-property:width,background;-webkit-transition-timing-function:ease;-moz-transition-duration:400ms;-moz-transition-property:width,background;-moz-transition-timing-function:ease;-o-transition-duration:400ms;-o-transition-property:width,background;-o-transition-timing-function:ease;}#wpadminbar #adminbarsearch .adminbar-input:focus{color:#555;text-shadow:0 1px 0 #fff;width:200px;background-color:rgba(255,255,255,0.9);}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-button{display:none;}#wpadminbar .wp-admin-bar-logo>a{padding-left:24px;background:url(../images/wp-logo-white.png) no-repeat 13px 6px;}#wpadminbar .wp-admin-bar-logo>a span{height:28px;}#wpadminbar.nojs .wp-admin-bar-logo:hover>a,#wpadminbar .wp-admin-bar-logo.hover>a,#wpadminbar .quicklinks .wp-admin-bar-logo>a:focus{background:url(../images/wp-logo-dark.png) no-repeat 12px 6px;}#wpadminbar .ab-comments-icon{position:relative;padding-top:5px;float:left;}#wpadminbar .ab-comments-icon-body{margin-top:3px;background:#999;height:10px;width:14px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar a:hover .ab-comments-icon-body{background:#bbb;color:#555;}#wpadminbar a .ab-comments-icon-arrow{height:0;position:absolute;bottom:-3px;left:3px;border-left:4px solid #999;border-bottom:4px solid transparent;}#wpadminbar a:hover .ab-comments-icon-arrow{border-left-color:#bbb;}#wpadminbar #ab-awaiting-mod{margin-left:4px;}#wpadminbar span.count-0{display:none;}* html #wpadminbar{overflow:hidden;position:absolute;}* html #wpadminbar .quicklinks ul li a{float:left;}* html #wpadminbar .menupop a span{background-image:none;} 
  • trunk/wp-includes/css/admin-bar.dev.css

    r19221 r19230  
    7979} 
    8080 
    81 #wpadminbar .quicklinks > ul > li.opposite { 
     81#wpadminbar .quicklinks .top-secondary > li { 
    8282    border-left: 1px solid #333; 
    8383    border-right: 0; 
    84 } 
    85  
    86 #wpadminbar .quicklinks > ul > li.opposite > a { 
     84    float: right; 
     85} 
     86 
     87#wpadminbar .quicklinks .top-secondary > li > a { 
    8788    border-left: 1px solid #555; 
    8889    border-right: 0; 
     
    118119} 
    119120 
    120 #wpadminbar .quicklinks .opposite.menupop ul { 
     121#wpadminbar .quicklinks .top-secondary .menupop ul { 
    121122    right: 0; 
    122123    margin: 0 -1px 0 0; 
     
    167168} 
    168169 
    169 #wpadminbar .quicklinks .opposite.menupop li:hover > ul, 
    170 #wpadminbar .quicklinks .opposite.menupop li.hover > ul { 
     170#wpadminbar .quicklinks .top-secondary .menupop li:hover > ul, 
     171#wpadminbar .quicklinks .top-secondary .menupop li.hover > ul { 
    171172    margin-left: 0; 
    172173    left: inherit; 
     
    233234} 
    234235 
    235 #wpadminbar .opposite.menupop li a > span { 
     236#wpadminbar .top-secondary .menupop li a > span { 
    236237    background-position: -28px -31px; 
    237238    padding: 0 0 0 1.5em; 
    238239} 
    239240 
    240 #wpadminbar .quicklinks .menupop .secondary { 
    241     background: #eee; 
    242     margin: 6px 0 -6px; 
    243     border-top: 1px solid #dfdfdf; 
    244 } 
    245  
    246 #wpadminbar .quicklinks .menupop .secondary > a { 
    247     display: none; 
    248 } 
    249  
    250 #wpadminbar .quicklinks .menupop li.secondary > ul, 
    251 #wpadminbar .quicklinks .opposite.menupop li.secondary > ul { 
     241#wpadminbar .quicklinks .menupop ul.sub-secondary { 
    252242    display: block; 
    253243    position: relative; 
     
    255245    margin: 0; 
    256246    border: 0; 
     247 
    257248    background: #eee; 
     249    margin: 6px 0 -6px; 
     250    border-top: 1px solid #dfdfdf; 
     251 
    258252    -moz-box-shadow: none; 
    259253    -webkit-box-shadow: none; 
     
    261255} 
    262256 
    263 #wpadminbar .quicklinks .menupop li.secondary > ul > li:hover, 
    264 #wpadminbar .quicklinks .menupop li.secondary > ul > li.hover, 
    265 #wpadminbar .quicklinks .menupop li.secondary > ul > li a:focus { 
     257#wpadminbar .quicklinks .menupop .sub-secondary > li:hover, 
     258#wpadminbar .quicklinks .menupop .sub-secondary > li.hover, 
     259#wpadminbar .quicklinks .menupop .sub-secondary > li a:focus { 
    266260    background: #dfdfdf; 
    267261} 
     
    284278} 
    285279 
    286 #wpadminbar li.opposite { 
     280#wpadminbar .top-secondary { 
    287281    float: right; 
    288282} 
  • trunk/wp-includes/script-loader.php

    r19225 r19230  
    453453    $styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' ); 
    454454    $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' ); 
    455     $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20111108a' ); 
     455    $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20111109' ); 
    456456    $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20111107' ); 
    457457    $styles->add( 'editor-buttons', "/wp-includes/css/editor-buttons$suffix.css", array(), '20111107' ); 
Note: See TracChangeset for help on using the changeset viewer.