Changeset 7262 for branches/2.6/src/includes/search/template.php
- Timestamp:
- 06/28/2024 06:06:30 PM (22 months ago)
- File:
-
- 1 edited
-
branches/2.6/src/includes/search/template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/src/includes/search/template.php
r7176 r7262 47 47 } 48 48 49 // What are the default allowed statuses (based on user caps) 50 if ( bbp_get_view_all() ) { 51 52 // Default view=all statuses 53 $post_statuses = array_keys( bbp_get_topic_statuses() ); 54 55 // Add support for private status 56 if ( current_user_can( 'read_private_topics' ) ) { 57 $post_statuses[] = bbp_get_private_status_id(); 58 } 59 60 // Join post statuses together 61 $default['post_status'] = $post_statuses; 62 63 // Lean on the 'perm' query var value of 'readable' to provide statuses 64 } else { 65 $default['perm'] = 'readable'; 66 } 49 // Default public statuses (topics coincidentally cover all post types) 50 $post_statuses = array_keys( bbp_get_public_topic_statuses() ); 51 52 // Add support for private status 53 if ( current_user_can( 'read_private_topics' ) ) { 54 $post_statuses[] = bbp_get_private_status_id(); 55 } 56 57 // Add support for hidden status 58 if ( current_user_can( 'read_hidden_topics' ) ) { 59 $post_statuses[] = bbp_get_hidden_status_id(); 60 } 61 62 // Join post statuses together 63 $default['post_status'] = $post_statuses; 67 64 68 65 /** Setup *****************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.