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/replies/template-tags.php

    r4564 r4579  
    224224     * @param $reply_id Optional. Used to check emptiness
    225225     * @uses bbPress::reply_query::post::ID To get the reply id
    226      * @uses bbp_is_reply() To check if it's a reply page
     226     * @uses bbp_is_reply() To check if the search result is a reply
     227     * @uses bbp_is_single_reply() To check if it's a reply page
    227228     * @uses bbp_is_reply_edit() To check if it's a reply edit page
    228229     * @uses get_post_field() To get the post's post type
     
    245246        } elseif ( !empty( $bbp->reply_query->in_the_loop ) && isset( $bbp->reply_query->post->ID ) ) {
    246247            $bbp_reply_id = $bbp->reply_query->post->ID;
     248
     249        // Currently inside a search loop
     250        } elseif ( !empty( $bbp->search_query->in_the_loop ) && isset( $bbp->search_query->post->ID ) && bbp_is_reply( $bbp->search_query->post->ID ) ) {
     251            $bbp_reply_id = $bbp->search_query->post->ID;
    247252
    248253        // Currently viewing a forum
Note: See TracChangeset for help on using the changeset viewer.