[buddypress-trac] [BuddyPress Trac] #6063: Support meta query in bp_has_message_threads()

buddypress-trac noreply at wordpress.org
Wed Dec 10 18:50:26 UTC 2014


#6063: Support meta query in bp_has_message_threads()
-------------------------+-----------------
 Reporter:  r-a-y        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  2.2
Component:  Messaging    |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------
 Now that we have a meta table for messages, it would be nice to get meta
 queries working with `bp_has_message_threads()`.

 Attached patch does this.

 Some notes:

 * In order to support `'meta_query'` as an extra parameter, I changed
 `BP_Messages_Thread::get_current_threads_for_user()` /
 `BP_Message_Box_Template` to use one argument instead of multiple
 arguments.
 * I've refactored `BP_Messages_Message::get_current_threads_for_user()` so
 the SQL statement isn't duplicated in two spots.
 * Adds a unit test.  If you analyze the test, there's a hint at getting a
 "Starred" box working.  Might be better if this were a taxonomy instead of
 using meta, but it's just a test :)

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


More information about the buddypress-trac mailing list