Changeset 13148 for trunk/src/bp-messages/bp-messages-template.php
- Timestamp:
- 11/13/2021 06:54:07 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-template.php
r13147 r13148 24 24 * @param array|string $args { 25 25 * Array of arguments. All are optional. 26 * @type int $user_id ID of the user whose threads are being loaded. 27 * Default: ID of the logged-in user. 28 * @type string $box Current "box" view. If not provided here, the current 29 * view will be inferred from the URL. 30 * @type int $per_page Number of results to return per page. Default: 10. 31 * @type int $max Max results to return. Default: false. 32 * @type string $type Type of messages to return. Values: 'all', 'read', 'unread' 33 * Default: 'all' 34 * @type string $search_terms Terms to which to limit results. Default: 35 * the value of $_REQUEST['s']. 36 * @type string $page_arg URL argument used for the pagination param. 37 * Default: 'mpage'. 38 * @type array $meta_query Meta query arguments. Only applicable if $box is 39 * not 'notices'. See WP_Meta_Query more details. 26 * @type int $user_id ID of the user whose threads are being loaded. 27 * Default: ID of the logged-in user. 28 * @type string $box Current "box" view. If not provided here, the current 29 * view will be inferred from the URL. 30 * @type int $per_page Number of results to return per page. Default: 10. 31 * @type int $max Max results to return. Default: false. 32 * @type string $type Type of messages to return. Values: 'all', 'read', 'unread' 33 * Default: 'all' 34 * @type string $search_terms Terms to which to limit results. Default: 35 * the value of $_REQUEST['s']. 36 * @type string $page_arg URL argument used for the pagination param. 37 * Default: 'mpage'. 38 * @type array $meta_query Meta query arguments. Only applicable if $box is 39 * not 'notices'. See WP_Meta_Query more details. 40 * @type int|null $recipients_page Page of recipients being requested. Default to null, meaning all. 41 * @type int|null $recipients_per_page Recipients to return per page. Defaults to null, meaning all. 42 * @type int|null $messages_page Page of messages being requested. Default to null, meaning all. 43 * @type int|null $messages_per_page Messages to return per page. Defaults to null, meaning all 40 44 * } 41 45 * @return bool True if there are threads to display, otherwise false. … … 47 51 $current_action = bp_current_action(); 48 52 switch ( $current_action ) { 49 case 'sentbox' 50 case 'notices' 51 case 'inbox' 53 case 'sentbox': 54 case 'notices': 55 case 'inbox': 52 56 $default_box = $current_action; 53 57 break; 54 default 58 default: 55 59 $default_box = 'inbox'; 56 60 break; … … 68 72 $args, 69 73 array( 70 'user_id' => $user_id, 71 'box' => $default_box, 72 'per_page' => 10, 73 'max' => false, 74 'type' => 'all', 75 'search_terms' => $search_terms, 76 'page_arg' => 'mpage', // See https://buddypress.trac.wordpress.org/ticket/3679. 77 'meta_query' => array(), 74 'user_id' => $user_id, 75 'box' => $default_box, 76 'per_page' => 10, 77 'max' => false, 78 'type' => 'all', 79 'search_terms' => $search_terms, 80 'page_arg' => 'mpage', // See https://buddypress.trac.wordpress.org/ticket/3679. 81 'meta_query' => array(), 82 'recipients_page' => null, 83 'recipients_per_page' => null, 84 'messages_page' => null, 85 'messages_per_page' => null, 78 86 ), 79 87 'has_message_threads'
Note: See TracChangeset
for help on using the changeset viewer.