Changeset 17279 for trunk/wp-includes/class-wp-admin-bar.php
- Timestamp:
- 01/13/2011 01:34:15 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/class-wp-admin-bar.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-admin-bar.php
r17269 r17279 114 114 /* Helpers */ 115 115 function recursive_render( $id, &$menu_item ) { ?> 116 <?php $menuclass = ( ! empty( $menu_item['children'] ) ) ? 'menupop ' : ''; ?> 117 118 <li class="<?php echo $menuclass . "ab-$id" ?><?php 119 if ( ! empty( $menu_item['meta']['class'] ) ) : 120 echo ' ' . esc_attr( $menu_item['meta']['class'] ); 121 endif; 122 ?>"> 116 <?php 117 $is_parent = ! empty( $menu_item['children'] ); 118 119 $menuclass = $is_parent ? 'menupop' : ''; 120 if ( ! empty( $menu_item['meta']['class'] ) ) 121 $menuclass .= ' ' . $menu_item['meta']['class']; 122 ?> 123 124 <li id="<?php echo esc_attr( "wp-admin-bar-$id" ); ?>" class="<?php echo esc_attr( $menuclass ); ?>"> 123 125 <a href="<?php echo esc_url( $menu_item['href'] ) ?>"<?php 124 126 if ( ! empty( $menu_item['meta']['onclick'] ) ) : … … 134 136 ?>><?php 135 137 136 if ( ! empty( $menuclass )) :138 if ( $is_parent ) : 137 139 ?><span><?php 138 140 endif; … … 140 142 echo $menu_item['title']; 141 143 142 if ( ! empty( $menuclass )) :144 if ( $is_parent ) : 143 145 ?></span><?php 144 146 endif; … … 146 148 ?></a> 147 149 148 <?php if ( ! empty( $menu_item['children'] )) : ?>150 <?php if ( $is_parent ) : ?> 149 151 <ul> 150 152 <?php foreach ( $menu_item['children'] as $child_id => $child_menu_item ) : ?>
Note: See TracChangeset
for help on using the changeset viewer.