Skip to:

Opened 6 years ago

Closed 6 years ago

#7941 closed defect (bug) (no action required)

Buddy press action hook for BP message reply

Reported by: rgipp1's profile rgipp1 Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: Priority: normal
Severity: normal Version: 3.0.0
Component: Messages Keywords:


I'm looking to take action when any BP message is replied to.
I read thru the BuddyPress Actions Hooks document and tried many of the BP action hooks with no success.

Here's an example of my code in a plugin I created (below).

I test it by replying to a message in BuddyPress.

I'm not getting the function to execute since the file isn't getting created.

function test_message_meta_display() {

$myfile = fopen("deletethreadsinfunction.txt", "w") or die("Unable to open file!");

$txt = "threadID, userID = " . $threadID . " " . $userID . "\n";
fwrite($myfile, $txt);


add_action( 'bp_after_message_content', 'test_message_meta_display', 10, 0 );

Change History (1)

#1 @r-a-y
6 years ago

  • Component changed from Sites to Messages
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

You reference $threadID and $userID, but you are not actually referencing the thread ID or user ID anywhere.

We have some message thread template tags here for the thread ID and sender ID:

Closing this one.

Note: See TracTickets for help on using tickets.