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

buddypress-trac noreply at wordpress.org
Wed Jul 31 15:39:08 UTC 2013


#5123: Add bp_the_thread_message_id() to bp-messages-template.php
-------------------------+---------------------------
 Reporter:  dtc7240      |       Owner:  boonebgorges
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  1.9
Component:  Messaging    |     Version:
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |
-------------------------+---------------------------

Comment (by dtc7240):

 Thanks Boone.  Can we add an isset statement?  I found that when
 submitting a message reply, it was throwing a 'Trying to get property of
 non-object' notice and I'd hate to gunk up people's debug logs...


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

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

 }}}

 Thanks again,
 Scott

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


More information about the buddypress-trac mailing list