[buddypress-trac] [BuddyPress] #5123: Add bp_the_thread_message_id() to bp-messages-template.php

buddypress-trac noreply at wordpress.org
Tue Jul 30 17:36:43 UTC 2013


#5123: Add bp_the_thread_message_id() to bp-messages-template.php
-------------------------+-----------------------------
 Reporter:  dtc7240      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Messaging    |    Version:
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------------
 I had a need to get the actual message_id of a message in a thread and
 found no existing function to easily grab it.  Can you please add the
 following '''bp_the_thread_message_id()''' function to the bottom of bp-
 messages-template.php, just after bp_the_thread_message_content()?


 {{{
 function bp_the_thread_message_id() {
         echo bp_get_the_thread_message_id();
 }
         function bp_get_the_thread_message_id() {
                 global $thread_template;

                 return apply_filters( 'bp_get_the_thread_message_id',
 $thread_template->message->id );
         }

 }}}


 I modeled it after the existing '''bp_the_thread_message_content()'''
 function:


 {{{
 function bp_the_thread_message_content() {
         echo bp_get_the_thread_message_content();
 }
         function bp_get_the_thread_message_content() {
                 global $thread_template;

                 return apply_filters( 'bp_get_the_thread_message_content',
 $thread_template->message->message );
         }

 }}}

 Many thanks,
 Scott Seitz

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5123>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list