Warm tip: This article is reproduced from serverfault.com, please click

How can I add a custom button the messenger page in BuddyBoss?

发布于 2020-11-28 10:48:23

enter image description hereenter image description hereThere is a hook in buddyboss-platform/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/parts/bp-message-form.php:33 called bp_nouveau_messages_hook( 'after', 'compose_content' ); which I want to access from my child theme in order to add some html. However, this hook doesn't behave like normal WordPress hooks and I cannot figure out how to access it.

Questioner
Kristifer Szabo
Viewed
0
shanebp 2020-12-01 08:20:53

The BP Nouveau template pack uses dynamic hooks.

bp_nouveau_messages_hook( 'after', 'compose_content' );

To use this hook you must include the component name ( messages ) between the stated pieces:

function test_nouveau_hook() {
    echo '<br>additional content here';
}
add_action( 'bp_after_messages_compose_content', 'test_nouveau_hook' );