Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/16/2012 08:19:21 AM (13 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/forums/template-tags.php

    r4517 r4579  
    141141     * @uses bbPress::forum_query::post::ID To get the forum id
    142142     * @uses WP_Query::post::ID To get the forum id
     143     * @uses bbp_is_forum() To check if the search result is a forum
    143144     * @uses bbp_is_single_forum() To check if it's a forum page
    144145     * @uses bbp_is_single_topic() To check if it's a topic page
     
    161162        } elseif ( !empty( $bbp->forum_query->in_the_loop ) && isset( $bbp->forum_query->post->ID ) ) {
    162163            $bbp_forum_id = $bbp->forum_query->post->ID;
     164
     165        // Currently inside a search loop
     166        } elseif ( !empty( $bbp->search_query->in_the_loop ) && isset( $bbp->search_query->post->ID ) && bbp_is_forum( $bbp->search_query->post->ID ) ) {
     167            $bbp_forum_id = $bbp->search_query->post->ID;
    163168
    164169        // Currently viewing a forum
Note: See TracChangeset for help on using the changeset viewer.