Add custom links in 3.0 admin quick nav

Adding this snippet to the functions.php of your wordpress theme will allow you to customize the wordpress 3.0 admin quick nav menu. This includes the welcome message and any of the links within the quick nav menu.

 

 

add_filter( 'admin_user_info_links', 'filter_user_admin_menu' );
function filter_user_admin_menu()
{
global $current_user;
get_currentuserinfo();
$links = array();
$links[5] = sprintf( __('Sup!, %1$s'), $current_user->display_name );
$links[6] = '<a href="users.php" title="Manage Users">Manage Users</a>';
if ( current_user_can( 'publish_posts' ) ) $links[10] = '<a href="' . admin_url() . 'edit.php" title="">Manage Posts</a>';
$links[14] = '<a href="profile.php" title="' . esc_attr__('Edit your profile') . '">' . __('Your Profile') . '</a>';
$links[15] = '<a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';
return $links;
}

Leave a comment