Skip to:
Content
Pages
Categories
Search
Top
Bottom

Where is bp_after_member_header defined

  • @becks-star

    Participant

    Hi there,

    i feel a bit awkward when asking this, but i just cant find this function anywhere.
    My Intention is to add some member specific content to the members page.
    So i found out that i will have to edit
    ./bp-templates/bp-legacy/buddypress/members/single/member-header.php
    I opened it and there is do_action( ‘bp_profile_after_header’ ); which seems to be suitable for my needs.
    But where is this action/function defined so i can edit it? I didnt find it and no one asked this before as it seems (Which i didnt think is possible in this times ;))

    Thanks
    Daniel

Viewing 4 replies - 1 through 4 (of 4 total)
  • @henrywright

    Moderator

    Hi @becks-star

    bp_profile_after_header isn’t a function. It’s an action hook. You would usually write a function of your own and ‘hook’ it to bp_profile_after_header.

    For example:

    function my_callback() {
        // Do something amazing...
    }
    add_action( 'bp_profile_after_header', 'my_callback' );

    You can read more about hooks here: https://codex.wordpress.org/Plugin_API/Hooks

    @becks-star

    Participant

    Hi @henrywright
    thanks for your reply.
    I know the basics about hooks. But what messed up my brain was that it is already used in that line i posted:
    do_action( ‘bp_profile_after_header’ );
    So i assumed it already got written and hooked somewhere else.
    But ok, thanks for making things clear. I will create and hook it myself then
    Daniel

    @henrywright

    Moderator

    Sometimes plugin authors throw out a hook and don’t actually bite themselves. It’s a good way to make a plugin extendible 🙂

    @becks-star

    Participant

    Aight, good to know 😉
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Where is bp_after_member_header defined’ is closed to new replies.
Skip to toolbar