Skip to:
Content

BuddyPress.org

Changeset 12055


Ignore:
Timestamp:
05/03/2018 11:26:40 PM (18 months ago)
Author:
imath
Message:

Nouveau: make sure the starred box is reachable by the Messages UI

Props r-a-y

Fixes #7809

Location:
trunk/src/bp-messages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-star.php

    r11925 r12055  
    365365}
    366366add_filter( 'bp_get_the_thread_message_css_class', 'bp_messages_star_message_css_class' );
     367
     368/**
     369 * Filter message threads by those starred by the logged-in user.
     370 *
     371 * @since 2.3.0
     372 *
     373 * @param  array $r Current message thread arguments.
     374 * @return array $r Array of starred message threads.
     375 */
     376function bp_messages_filter_starred_message_threads( $r = array() ) {
     377    $r['box'] = 'starred';
     378    $r['meta_query'] = array( array(
     379        'key'   => 'starred_by_user',
     380        'value' => $r['user_id']
     381    ) );
     382
     383    return $r;
     384}
  • trunk/src/bp-messages/screens/starred.php

    r11925 r12055  
    4141    remove_filter( 'bp_after_has_message_threads_parse_args', 'bp_messages_filter_starred_message_threads' );
    4242}
    43 
    44 /**
    45  * Filter message threads by those starred by the logged-in user.
    46  *
    47  * @since 2.3.0
    48  *
    49  * @param  array $r Current message thread arguments.
    50  * @return array $r Array of starred message threads.
    51  */
    52 function bp_messages_filter_starred_message_threads( $r = array() ) {
    53     $r['box'] = 'starred';
    54     $r['meta_query'] = array( array(
    55         'key'   => 'starred_by_user',
    56         'value' => $r['user_id']
    57     ) );
    58 
    59     return $r;
    60 }
Note: See TracChangeset for help on using the changeset viewer.