Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

#6775 closed enhancement (fixed)

Messages: Add hook after message action links.

Reported by: dcavins's profile dcavins Owned by: dcavins's profile dcavins
Milestone: 2.5 Priority: low
Severity: minor Version: 2.4.0
Component: Messages Keywords: has-patch
Cc: dcavins

Description

I'd like to make it possible for custom actions to be appended to the existing message action links as in the attached images. This would be useful for spam reporting, in my case. Patch attached.

Attachments (3)

mesages_loop_add_action.png (13.2 KB) - added by dcavins 9 years ago.
Added action link in messages loop.
mesages_single_add_action.png (9.0 KB) - added by dcavins 9 years ago.
Custom action link added to single message thread header.
6775.01.patch (1.6 KB) - added by dcavins 9 years ago.
Add a hook after the action links in the messages loop and in the header of an individual message thread.

Download all attachments as: .zip

Change History (7)

@dcavins
9 years ago

Added action link in messages loop.

@dcavins
9 years ago

Custom action link added to single message thread header.

@dcavins
9 years ago

Add a hook after the action links in the messages loop and in the header of an individual message thread.

#1 @DJPaul
9 years ago

  • Milestone changed from Awaiting Review to 2.5

I am happy with this because an action isn't going to break someone's theme on update, but let's let someone else sign-off before you commit this.

#2 @r-a-y
9 years ago

I hate adding new hooks, but it looks like it is necessary here.

Perhaps call the hook in messages-loop.php - 'bp_messages_thread_options' or 'bp_messages_inbox_thread_options'.

Perhaps call the hook in single.php - 'bp_after_message_thread_recipients' - since this hook would fire inside the <p id="message-recipients"> block.

Could use someone that has a better grasp of semantics here! :)

This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.


9 years ago

#4 @dcavins
9 years ago

  • Owner set to dcavins
  • Resolution set to fixed
  • Status changed from new to closed

In 10564:

Messages: Add hooks in loop and single templates.

Add an action hook to the thread options cell in
the messages loop template and another following
the "delete" link in a single message's
#message-recipients block.

Fixes #6775.

Note: See TracTickets for help on using tickets.