Changeset 3926
- Timestamp:
- 05/30/2012 10:55:38 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-topic-template.php
r3899 r3926 82 82 // What are the default allowed statuses (based on user caps) 83 83 if ( !bbp_is_query_name( 'bbp_widget' ) && bbp_get_view_all() ) 84 $default_ status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() ) );84 $default_post_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() ) ); 85 85 else 86 $default_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ); 87 88 // Default arguments 86 $default_post_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ); 87 88 $default_topic_search = !empty( $_REQUEST['ts'] ) ? $_REQUEST['ts'] : false; 89 $default_show_stickies = (bool) ( bbp_is_single_forum() || bbp_is_topic_archive() ) && ( false === $default_topic_search ); 90 $default_post_parent = bbp_is_single_forum() ? bbp_get_forum_id() : 'any'; 91 92 // Default argument array 89 93 $default = array( 90 'post_type' => bbp_get_topic_post_type(), // Narrow query down to bbPress topics91 'post_parent' => bbp_is_single_forum() ? bbp_get_forum_id() : 'any',// Forum ID92 ' meta_key' => '_bbp_last_active_time', // Make sure topic has some last activity time93 ' orderby' => 'meta_value', // 'meta_value', 'author', 'date', 'title', 'modified', 'parent', rand',94 'order ' => 'DESC', // 'ASC', 'DESC'95 ' posts_per_page' => bbp_get_topics_per_page(), // Topics per page96 'p aged' => bbp_get_paged(), // Page Number97 ' s' => !empty( $_REQUEST['ts'] ) ? $_REQUEST['ts'] : '', // Topic Search98 's how_stickies' => bbp_is_single_forum() || bbp_is_topic_archive(), // Ignore sticky topics?99 ' max_num_pages' => false, // Maximum number of pages to show100 ' post_status' => $default_status, // Post Status94 'post_type' => bbp_get_topic_post_type(), // Narrow query down to bbPress topics 95 'post_parent' => $default_post_parent, // Forum ID 96 'post_status' => $default_post_status, // Post Status 97 'meta_key' => '_bbp_last_active_time', // Make sure topic has some last activity time 98 'orderby' => 'meta_value', // 'meta_value', 'author', 'date', 'title', 'modified', 'parent', rand', 99 'order' => 'DESC', // 'ASC', 'DESC' 100 'posts_per_page' => bbp_get_topics_per_page(), // Topics per page 101 'paged' => bbp_get_paged(), // Page Number 102 's' => $default_topic_search, // Topic Search 103 'show_stickies' => $default_show_stickies, // Ignore sticky topics? 104 'max_num_pages' => false, // Maximum number of pages to show 101 105 ); 102 106
Note: See TracChangeset
for help on using the changeset viewer.