Definition:
function wp_admin_bar_my_account_menu( $wp_admin_bar ) {}
Add the "My Account" submenu items.
Parameters
- $wp_admin_bar
Source code
function wp_admin_bar_my_account_menu( $wp_admin_bar ) {
$user_id = get_current_user_id();
$current_user = wp_get_current_user();
$profile_url = get_edit_profile_url( $user_id );
if ( ! $user_id )
return;
$wp_admin_bar->add_group( array(
'parent' => 'my-account',
'id' => 'user-actions',
) );
$user_info = get_avatar( $user_id, 64 );
$user_info .= "<span class='display-name'>{$current_user->display_name}</span>";
10585

February 24, 2011 


No comments yet... Be the first to leave a reply!