[buddypress-trac] [BuddyPress Trac] #7652: Using template loop functions in a different (or no-loop context)

buddypress-trac noreply at wordpress.org
Sat Jan 27 14:14:31 UTC 2018


#7652: Using template loop functions in a different (or no-loop context)
-------------------------+----------------------------------
 Reporter:  DJPaul       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Under Consideration
Component:  Core         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+----------------------------------

Comment (by antonioeatgoat):

 @DJPaul for instance as I told in #7640, in a theme I tried to use the
 functions `bp_get_send_public_message_link()` and
 `bp_get_send_private_message_link()` in the header of the single member
 page, in order to provide quick links to public and private messages.
 However that functions don't accept the user id as parameter, so they
 weren't working there.

 I'd have solved with something like these:

 `bp_get_send_public_message_button( array( 'link_href' =>
 bp_get_send_public_message_link($user_id) ) );`
 `bp_get_send_message_button( array( 'link_href' =>
 bp_get_send_private_message_link($user_id) ) );`

 But those functions don't accept parameters at all. So at the end I had to
 solve with a kind of hack in using the filters inside the functions.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7652#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list