BuddyDev

Search

[Resolved] The right action hook for own profile

  • Participant
    Level: Yogi
    Posts: 1112
    calu on #29545

    Hi Brajesh, I need some help finding the right action hook, and have tried all potential hooks.

    I want to show profile edit tabs, after own profile fields, but exclude other members, as it makes no sense having edit tabs on other members profiles.

    Hooks like bp_after_profile_content and bp_after_profile_field_contentdoes not exclude other members, but displays on all profiles.

    You could say that I am looking for is a hook doing the opposite of bp_after_member_bodywhich exclude own profile.

    Can you help me with a hook showing content after profile content, on own profile only?

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24599
    Brajesh Singh on #29546

    Hi Carsten,
    Thank you for the question.

    You can use any of the above hook. All you need to do is wrap the link in a condition like this

    
    
    if ( bp_is_my_profile() ) {
    	// echo edit links here
    }
    
    

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1112
    calu on #29548

    Hi Brajesh, thanks for coming up with a solution so quick 😉

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24599
    Brajesh Singh on #29569

    You are welcome 🙂

The topic ‘ [Resolved] The right action hook for own profile’ is closed to new replies.

This topic is: resolved