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-functions.php

    r4141 r4172  
    522522    if ( empty( $slug ) ) {
    523523        switch ( $search_which ) {
     524            case 'posts':
     525                $slug = '';
     526                $var  = '/?s=';
     527                break;
     528
    524529            case 'blogs':
    525530                $slug = bp_is_active( 'blogs' )  ? $bp->blogs->root_slug  : '';
     
    541546        }
    542547
    543         if ( empty( $slug ) ) {
     548        if ( empty( $slug ) && 'posts' != $search_which ) {
    544549            bp_core_redirect( bp_get_root_domain() );
    545550            return;
Note: See TracChangeset for help on using the changeset viewer.