Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/07/2011 08:07:24 PM (14 years ago)
Author:
djpaul
Message:

Add search posts option into the header search box. Fixes #2255, props PedroMiguel and sorich87.
Also fixes search handling which was broken.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-catchuri.php

    r4112 r4172  
    187187           
    188188            // Force BP to recognize that this is a members page
    189             $matches[]  = 1;
    190             $match      = $bp->pages->members;
    191             $match->key = 'members';
     189            $matches[]  = 1;
     190            $match      = $bp->pages->members;
     191            $match->key = 'members';
    192192           
    193193            // Without the 'members' URL chunk, WordPress won't know which page to load
     
    200200
    201201    // Search doesn't have an associated page, so we check for it separately
    202     if ( !empty( $bp_uri[0] ) && ( BP_SEARCH_SLUG == $bp_uri[0] ) )
    203         $matches[] = 1;
     202    if ( !empty( $bp_uri[0] ) && ( BP_SEARCH_SLUG == $bp_uri[0] ) ) {
     203        $matches[]   = 1;
     204        $match       = new stdClass;
     205        $match->key  = 'search';
     206        $match->slug = BP_SEARCH_SLUG;
     207    }
    204208
    205209    // This is not a BuddyPress page, so just return.
Note: See TracChangeset for help on using the changeset viewer.