Changeset 4171
- Timestamp:
- 08/24/2012 08:12:00 AM (14 years ago)
- Location:
- branches/plugin/bbp-includes
- Files:
-
- 2 edited
-
bbp-reply-template.php (modified) (2 diffs)
-
bbp-topic-template.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-reply-template.php
r4156 r4171 44 44 * 45 45 * @param mixed $args All the arguments supported by {@link WP_Query} 46 * @uses bbp_is_user_bozo() To add the bozo post status 46 47 * @uses bbp_show_lead_topic() Are we showing the topic as a lead? 47 48 * @uses bbp_get_topic_id() To get the topic id … … 68 69 69 70 // What are the default allowed statuses (based on user caps) 70 if ( bbp_get_view_all( 'edit_others_replies' ) ) 71 $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() ) ); 72 else 73 $default_post_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ); 74 75 // Maybe Search 71 if ( bbp_get_view_all( 'edit_others_replies' ) ) { 72 $post_statuses = array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() ); 73 } else { 74 $post_statuses = array( bbp_get_public_status_id(), bbp_get_closed_status_id() ); 75 } 76 77 // Add the bozo status if user is a bozo 78 if ( bbp_is_user_bozo() ) { 79 $post_statuses[] = bbp_get_bozo_status_id(); 80 } 81 76 82 $default_reply_search = !empty( $_REQUEST['rs'] ) ? $_REQUEST['rs'] : false; 77 83 $default_post_parent = ( bbp_is_single_topic() ) ? bbp_get_topic_id() : 'any'; 78 84 $default_post_type = ( bbp_is_single_topic() && bbp_show_lead_topic() ) ? bbp_get_reply_post_type() : array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ); 85 $default_post_status = join( ',', $post_statuses ); 79 86 80 87 // Default query args -
branches/plugin/bbp-includes/bbp-topic-template.php
r4156 r4171 63 63 * @param mixed $args All the arguments supported by {@link WP_Query} 64 64 * @uses current_user_can() To check if the current user can edit other's topics 65 * @uses bbp_is_user_bozo() To add the bozo post status 65 66 * @uses bbp_get_topic_post_type() To get the topic post type 66 67 * @uses WP_Query To make query and get the topics … … 86 87 87 88 // What are the default allowed statuses (based on user caps) 88 if ( bbp_get_view_all() ) 89 $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() ) ); 90 else 91 $default_post_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ); 92 93 $default_topic_search = !empty( $_REQUEST['ts'] ) ? $_REQUEST['ts'] : false; 94 $default_show_stickies = (bool) ( bbp_is_single_forum() || bbp_is_topic_archive() ) && ( false === $default_topic_search ); 95 $default_post_parent = bbp_is_single_forum() ? bbp_get_forum_id() : 'any'; 89 if ( bbp_get_view_all() ) { 90 $post_statuses = array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() ); 91 } else { 92 $post_statuses = array( bbp_get_public_status_id(), bbp_get_closed_status_id() ); 93 } 94 95 // Add the bozo status if user is a bozo 96 if ( bbp_is_user_bozo() ) { 97 $post_statuses[] = bbp_get_bozo_status_id(); 98 } 99 100 $default_topic_search = !empty( $_REQUEST['ts'] ) ? $_REQUEST['ts'] : false; 101 $default_show_stickies = (bool) ( bbp_is_single_forum() || bbp_is_topic_archive() ) && ( false === $default_topic_search ); 102 $default_post_parent = bbp_is_single_forum() ? bbp_get_forum_id() : 'any'; 103 $default_post_status = join( ',', $post_statuses ); 96 104 97 105 // Default argument array … … 659 667 function bbp_get_topic_post_date( $topic_id = 0, $humanize = false, $gmt = false ) { 660 668 $topic_id = bbp_get_topic_id( $topic_id ); 661 669 662 670 // 4 days, 4 hours ago 663 671 if ( !empty( $humanize ) ) {
Note: See TracChangeset
for help on using the changeset viewer.