Changeset 4579 for trunk/includes/common/shortcodes.php
- Timestamp:
- 12/16/2012 08:19:21 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/common/shortcodes.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/common/shortcodes.php
r4510 r4579 80 80 'bbp-single-view' => array( $this, 'display_view' ), // Single view 81 81 82 /** Search ********************************************************/ 83 84 'bbp-search' => array( $this, 'display_search' ), // Search 85 82 86 /** Account *******************************************************/ 83 87 … … 115 119 116 120 // Unset global queries 117 $bbp->forum_query = new stdClass; 118 $bbp->topic_query = new stdClass; 119 $bbp->reply_query = new stdClass; 121 $bbp->forum_query = new stdClass; 122 $bbp->topic_query = new stdClass; 123 $bbp->reply_query = new stdClass; 124 $bbp->search_query = new stdClass; 120 125 121 126 // Unset global ID's … … 603 608 } 604 609 610 /** Search ****************************************************************/ 611 612 /** 613 * Display the contents of search results in an output buffer and return to 614 * ensure that post/page contents are displayed first. 615 * 616 * @since bbPress (r4579) 617 * 618 * @param array $attr 619 * @param string $content 620 * @uses bbp_search_query() 621 * @uses get_template_part() 622 */ 623 public function display_search( $attr, $content = '' ) { 624 625 // Set passed attribute to $search_terms for clarity 626 $search_terms = $attr['search']; 627 628 // Start output buffer 629 $this->start( 'bbp_search' ); 630 631 // Unset globals 632 $this->unset_globals(); 633 634 // Load the search 635 bbp_search_query( array( 's' => $search_terms ) ); 636 637 // Output template 638 bbp_get_template_part( 'content', 'search' ); 639 640 // Return contents of output buffer 641 return $this->end(); 642 } 643 605 644 /** Account ***************************************************************/ 606 645
Note: See TracChangeset
for help on using the changeset viewer.