Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/16/2012 08:19:21 AM (12 years ago)
Author:
jmdodd
Message:

Introduce dedicated forum search.

  • Search forums, topics, and replies.
  • Add new search functions, including bbp_has_search_results().
  • Provide templates for search results.
  • Fixes #1575.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core/theme-compat.php

    r4534 r4579  
    436436 * @uses bbp_is_single_view() To check if page is single view
    437437 * @uses bbp_get_single_view_template() To get view template
     438 * @uses bbp_is_search() To check if page is search
     439 * @uses bbp_get_search_template() To get search template
    438440 * @uses bbp_is_forum_edit() To check if page is forum edit
    439441 * @uses bbp_get_forum_edit_template() To get forum edit template
     
    584586            'ID'             => 0,
    585587            'post_title'     => bbp_get_view_title(),
     588            'post_author'    => 0,
     589            'post_date'      => 0,
     590            'post_content'   => '',
     591            'post_type'      => '',
     592            'post_status'    => bbp_get_public_status_id(),
     593            'comment_status' => 'closed'
     594        ) );
     595
     596    /** Search ************************************************************/
     597
     598    } elseif ( bbp_is_search() ) {
     599
     600        // Reset post
     601        bbp_theme_compat_reset_post( array(
     602            'ID'             => 0,
     603            'post_title'     => bbp_get_search_title(),
    586604            'post_author'    => 0,
    587605            'post_date'      => 0,
     
    825843        $new_content = $bbp->shortcodes->display_view( array( 'id' => get_query_var( 'bbp_view' ) ) );
    826844
     845    /** Search ************************************************************/
     846
     847    } elseif ( bbp_is_search() ) {
     848        $new_content = $bbp->shortcodes->display_search( array( 'search' => get_query_var( 'bbp_search' ) ) );
     849
    827850    /** Topic Tags ********************************************************/
    828851
Note: See TracChangeset for help on using the changeset viewer.