Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

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

Buddy press action hook for BP message reply

Reported by: rgipp1 Owned by: johnjamesjacoby
Priority: normal Milestone:
Component: Messages Version: 3.0.0
Severity: normal Keywords:
Cc:

Description

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
8 years ago

  • Component BuddyPress.org Sites → Messages
  • Milestone Awaiting Review
  • Resolution → invalid
  • Status new → 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:
​https://buddypress.trac.wordpress.org/browser/tags/3.1.0/src/bp-messages/bp-messages-template.php#L1758
​https://buddypress.trac.wordpress.org/browser/tags/3.1.0/src/bp-messages/bp-messages-template.php#L1863

Closing this one.

Note: See TracTickets for help on using tickets.