Changeset 4121
- Timestamp:
- 07/25/2012 06:50:43 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-core-widgets.php
r4039 r4121 379 379 $title = apply_filters( 'bbp_forum_widget_title', $instance['title'] ); 380 380 $parent_forum = !empty( $instance['parent_forum'] ) ? $instance['parent_forum'] : '0'; 381 382 // Note: private and hidden forums will be excluded via the 383 // bbp_pre_get_posts_exclude_forums filter and function. 381 384 $widget_query = new WP_Query( array( 382 385 'post_parent' => $parent_forum, … … 384 387 'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ), 385 388 'orderby' => 'menu_order', 386 'order' => 'ASC', 387 'meta_query' => array( bbp_exclude_forum_ids( 'meta_query' ) ) 389 'order' => 'ASC' 388 390 ) ); 389 391 … … 579 581 } 580 582 581 // Query defaults 583 // Note: private and hidden forums will be excluded via the 584 // bbp_pre_get_posts_exclude_forums filter and function. 582 585 $widget_query = new WP_Query( $topics_query ); 583 586 … … 726 729 extract( $args ); 727 730 728 $title = apply_filters( 'bbp_replies_widget_title', $instance['title'] ); 729 $max_shown = !empty( $instance['max_shown'] ) ? $instance['max_shown'] : '5'; 730 $show_date = !empty( $instance['show_date'] ) ? 'on' : false; 731 $post_types = !empty( $instance['post_type'] ) ? array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) : bbp_get_reply_post_type(); 731 $title = apply_filters( 'bbp_replies_widget_title', $instance['title'] ); 732 $max_shown = !empty( $instance['max_shown'] ) ? $instance['max_shown'] : '5'; 733 $show_date = !empty( $instance['show_date'] ) ? 'on' : false; 734 $post_types = !empty( $instance['post_type'] ) ? array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) : bbp_get_reply_post_type(); 735 736 // Note: private and hidden forums will be excluded via the 737 // bbp_pre_get_posts_exclude_forums filter and function. 732 738 $widget_query = new WP_Query( array( 733 739 'post_type' => $post_types,
Note: See TracChangeset
for help on using the changeset viewer.