[buddypress-trac] [BuddyPress] #3749: Default "bp_member_header_actions" buttons should be hooked at different priorities
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Mon Nov 14 23:28:22 UTC 2011
#3749: Default "bp_member_header_actions" buttons should be hooked at different
priorities
-------------------------+-----------------------------
Reporter: r-a-y | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Theme | Version: 1.2.6
Severity: trivial | Keywords:
-------------------------+-----------------------------
Let's say I want to place a button in between the "Add Friend" button and
the "Public Message" button on a member page.
Right now, I can't do this without unhooking the default buttons and
placing them at a lower priority.
A way to remedy this is to set priorities for the public and private
message buttons in functions.php.
eg.
{{{
if ( bp_is_active( 'friends' ) )
add_action( 'bp_member_header_actions',
'bp_add_friend_button' );
// Activity button
if ( bp_is_active( 'activity' ) )
add_action( 'bp_member_header_actions',
'bp_send_public_message_button' );
// Messages button
if ( bp_is_active( 'messages' ) )
add_action( 'bp_member_header_actions',
'bp_send_private_message_button' );
}}}
should be:
{{{
if ( bp_is_active( 'friends' ) )
add_action( 'bp_member_header_actions',
'bp_add_friend_button' );
// Activity button
if ( bp_is_active( 'activity' ) )
add_action( 'bp_member_header_actions',
'bp_send_public_message_button', 20 );
// Messages button
if ( bp_is_active( 'messages' ) )
add_action( 'bp_member_header_actions',
'bp_send_private_message_button', 30 );
}}}
The same should be done for buttons hooked to "bp_group_header_actions" as
well.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3749>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list