Changeset 16291
- Timestamp:
- 11/11/2010 11:49:37 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar.php
r16287 r16291 72 72 function wp_admin_bar_me_separator() { 73 73 global $wp_admin_bar; 74 $wp_admin_bar->add_menu( array( 'id' => 'me', 'title' => get_avatar( get_current_user_id(), 16 ), 'href' => get_edit_profile_url( get_current_user_id() ), ) ); 74 $user_id = get_current_user_id(); 75 if ( 0 != $user_id ) 76 $wp_admin_bar->add_menu( array( 'id' => 'me', 'title' => get_avatar( get_current_user_id(), 16 ), 'href' => get_edit_profile_url( $user_id ), ) ); 75 77 } 76 78 … … 84 86 85 87 $user_id = get_current_user_id(); 86 87 /* Add the 'My Account' menu */ 88 $wp_admin_bar->add_menu( array( 'id' => 'my-account', 'title' => $user_identity, 'href' => get_edit_profile_url( $user_id ) ) ); 89 90 /* Add the "My Account" sub menus */ 91 $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Edit My Profile' ), 'href' => get_edit_profile_url( $user_id ) ) ); 92 if ( is_multisite() ) 93 $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Dashboard' ), 'href' => get_dashboard_url( $user_id ), ) ); 94 else 95 $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Dashboard' ), 'href' => admin_url(), ) ); 96 $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Log Out' ), 'href' => wp_logout_url(), ) ); 88 89 if ( 0 != $user_id ) { 90 /* Add the 'My Account' menu */ 91 $wp_admin_bar->add_menu( array( 'id' => 'my-account', 'title' => $user_identity, 'href' => get_edit_profile_url( $user_id ) ) ); 92 93 /* Add the "My Account" sub menus */ 94 $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Edit My Profile' ), 'href' => get_edit_profile_url( $user_id ) ) ); 95 if ( is_multisite() ) 96 $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Dashboard' ), 'href' => get_dashboard_url( $user_id ), ) ); 97 else 98 $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Dashboard' ), 'href' => admin_url(), ) ); 99 $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Log Out' ), 'href' => wp_logout_url(), ) ); 100 } 97 101 } 98 102
Note: See TracChangeset
for help on using the changeset viewer.