Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Profile Tabs

Cheers Sam, that’s definitely the way to do it, but I can’t quite make it work. Adding the tab is easy, but following the link dumps you on the front page (if using add_profile_tab()) or in your profile (if adding the tab manually).

function felavatartab()
{
global $profile_menu, $profile_hooks;
$profile_tab = array(__('Avatar'), 'edit_profile', 'moderate', 'avatar-upload.php', 'avatar');
$profile_menu[] = $profile_tab;
if ( can_access_tab( $profile_tab, bb_get_current_user_info( 'id' ), $user_id ) )
$profile_hooks[bb_tag_sanitize($profile_tab[4])] = $profile_tab[3];
}
add_action( 'bb_profile_menu', 'felavatartab' );

OR

function felavatartab()
{
add_profile_tab(__('Avatar'), 'edit_profile', 'moderate', 'avatar-upload.php');
}
add_action( 'bb_profile_menu', 'felavatartab' );

I’ve got the file avatar-upload.php in my root directory, which loads the template avatar.php. If instead you give avatar.php as your argument the tab doesn’t show up at all.

See it here. Any idea?

Skip to toolbar