Make WordPress Core


Ignore:
Timestamp:
11/12/2011 12:26:55 AM (14 years ago)
Author:
koopersmith
Message:

Improve admin bar markup. Un-nest top level secondary menu. Remove unnecessary span. see #18197.

File:
1 edited

Legend:

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

    r19248 r19261  
    143143                    }
    144144
    145                     if ( ! empty( $this->root->children->secondary ) ):
    146                         ?><ul class="ab-top-menu top-secondary"><?php
    147 
    148                             foreach ( $this->root->children->secondary as $node ) {
    149                                 $this->recursive_render( $node );
    150                             }
    151 
    152                         ?></ul><?php
    153                     endif;
     145                ?></ul>
     146                <ul class="ab-top-menu ab-top-secondary"><?php
     147
     148                    foreach ( $this->root->children->secondary as $node ) {
     149                        $this->recursive_render( $node );
     150                    }
     151
    154152                ?></ul>
    155153            </div>
     
    188186            ?>><?php
    189187
    190             if ( $is_parent ) :
    191                 ?><span><?php
    192             endif;
    193 
    194188            echo $node->title;
    195 
    196             if ( $is_parent ) :
    197                 ?></span><?php
    198             endif;
    199189
    200190            ?></a>
     
    202192            <?php
    203193            if ( $is_parent ) :
    204                 ?><ul><?php
     194                ?><ul class="ab-submenu"><?php
    205195                foreach ( $node->children->primary as $child_node ) {
    206196                    $this->recursive_render( $child_node );
     
    208198
    209199                if ( ! empty( $node->children->secondary ) ):
    210                     ?><ul class="sub-secondary"><?php
     200                    ?><ul class="ab-sub-secondary"><?php
    211201                    foreach ( $node->children->secondary as $child_node ) {
    212202                        $this->recursive_render( $child_node );
Note: See TracChangeset for help on using the changeset viewer.