Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 4 years ago

Last modified 3 years ago

#6328 closed defect (bug) (fixed)

bp-legacy: Messages loop missing table header action

Reported by: r-a-y Owned by: r-a-y
Milestone: 2.3 Priority: normal
Severity: minor Version: 1.7
Component: Templates Keywords: has-patch
Cc:

Description

In the messages loop, there is an action to add an extra table column - 'bp_messages_inbox_list_item':
https://buddypress.trac.wordpress.org/browser/tags/2.2.1/src/bp-templates/bp-legacy/buddypress/members/single/messages/messages-loop.php#L64

But, there isn't a similar hook in the table header:
https://buddypress.trac.wordpress.org/browser/tags/2.2.1/src/bp-templates/bp-legacy/buddypress/members/single/messages/messages-loop.php#L25

This means attempting to add a table column will not work properly.

Attached patch adds a hook called 'bp_messages_inbox_list_header' in the <thead> of the template so plugins can properly add a table column.

This bug also exists in bp-default.

Attachments (2)

6328.01.patch (900 bytes) - added by r-a-y 5 years ago.
6328.01.2.patch (1.0 KB) - added by tw2113 5 years ago.

Download all attachments as: .zip

Change History (8)

@r-a-y
5 years ago

@tw2113
5 years ago

#1 @tw2113
5 years ago

Updated the patch to include a phpdoc for the hook.

#2 @r-a-y
4 years ago

Anyone got any qualms with the hook name before I commit?

'bp_messages_inbox_list_header', 'bp_messages_inbox_list_head' or something else?

#3 @boonebgorges
4 years ago

'bp_messages_inbox_list_header' seems fine to me.

#4 @tw2113
4 years ago

Do we have a different spot with a similar hook, or perhaps a hook missing that needs patched as well?

"header" is fine in my books as well.

#5 @r-a-y
4 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 9840:

bp-legacy: Add missing 'bp_messages_inbox_list_header' hook.

This is to mirror the 'bp_messages_inbox_list_item' hook to allow plugins
the ability to add an extra table column in the messages-loop.php template.

Props tw2113.

Fixes #6328.

#6 @DJPaul
3 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.