### Eclipse Workspace Patch 1.0
#P wordpress
|
|
|
|
| 92 | 92 | <div id="wpadminbar"> |
| 93 | 93 | <div class="quicklinks"> |
| 94 | 94 | <ul> |
| 95 | | <?php foreach ( (array) $this->menu as $id => $menu_item ) : ?> |
| | 95 | <?php foreach ( $this->menu as $id => $menu_item ) : ?> |
| 96 | 96 | <?php $this->recursive_render( $id, $menu_item ) ?> |
| 97 | 97 | <?php endforeach; ?> |
| 98 | 98 | </ul> |
| … |
… |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /* Helpers */ |
| 115 | | function recursive_render( $id, &$menu_item ) { ?> |
| | 115 | function recursive_render( $id, $menu_item ) { ?> |
| 116 | 116 | <?php |
| 117 | 117 | $is_parent = ! empty( $menu_item['children'] ); |
| 118 | 118 | |
| … |
… |
|
| 161 | 161 | </li><?php |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | | function add_node( $parent_id, &$menu, $child ) { |
| | 164 | function add_node( $parent_id, $menu, $child ) { |
| 165 | 165 | foreach( $menu as $id => $menu_item ) { |
| 166 | 166 | if ( $parent_id == $id ) { |
| 167 | 167 | $menu->{$parent_id}['children']->{$child['id']} = $child; |
| … |
… |
|
| 194 | 194 | do_action( 'add_admin_bar_menus' ); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | | function remove_node( $id, &$menu ) { |
| | 197 | function remove_node( $id, $menu ) { |
| 198 | 198 | if ( isset( $menu->$id ) ) { |
| 199 | 199 | unset( $menu->$id ); |
| 200 | 200 | return true; |