Changeset 3930
- Timestamp:
- 05/31/2012 06:07:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-core-shortcodes.php
r3758 r3930 312 312 $this->unset_globals(); 313 313 314 // Filter the query 315 if ( ! bbp_is_topic_archive() ) { 316 add_filter( 'bbp_before_has_topics_parse_args', array( $this, 'display_topic_index_query' ) ); 317 } 318 314 319 // Start output buffer 315 320 $this->start( 'bbp_topic_archive' ); 316 317 // Filter the query318 add_filter( 'bbp_pre_has_topics_query', array( $this, 'display_topic_index_query' ) );319 321 320 322 // Output template … … 369 371 } 370 372 373 // Filter the query 374 if ( ! bbp_is_single_topic() ) { 375 add_filter( 'bbp_before_has_replies_parse_args', array( $this, 'display_topic_query' ) ); 376 } 377 371 378 // Start output buffer 372 379 $this->start( 'bbp_single_topic' ); … … 374 381 // Check forum caps 375 382 if ( bbp_user_can_view_forum( array( 'forum_id' => $forum_id ) ) ) { 376 377 // Filter the query378 add_filter( 'bbp_pre_has_replies_query', array( $this, 'display_topic_query' ) );379 380 // Output template381 383 bbp_get_template_part( 'content', 'single-topic' ); 382 384 … … 542 544 $this->unset_globals(); 543 545 544 // Start output buffer 545 $this->start( 'bbp_topics_of_tag' ); 546 // Filter the query 547 if ( ! bbp_is_topic_tag() ) { 548 add_filter( 'bbp_before_has_topics_parse_args', array( $this, 'display_topics_of_tag_query' ) ); 549 } 550 551 // Start output buffer 552 $this->start( 'bbp_topic_tag' ); 546 553 547 554 // Set passed attribute to $ag_id for clarity 548 555 bbpress()->current_topic_tag_id = $tag_id = $attr['id']; 549 550 // Filter the query551 add_filter( 'bbp_pre_has_topics_query', array( $this, 'display_topics_of_tag_query' ) );552 556 553 557 // Output template … … 614 618 $this->unset_globals(); 615 619 616 // Load the topic index620 // Load the view 617 621 bbp_view_query( $view_id ); 618 622 … … 751 755 */ 752 756 public function display_topic_query( $args = array() ) { 753 754 757 $args['meta_query'] = array( array( 755 758 'key' => '_bbp_topic_id', … … 770 773 */ 771 774 public function display_topics_of_tag_query( $args = array() ) { 772 773 775 $args['tax_query'] = array( array( 774 776 'taxonomy' => bbp_get_topic_tag_tax_id(),
Note: See TracChangeset
for help on using the changeset viewer.