Skip to:
Content

BuddyPress.org

Changeset 3918


Ignore:
Timestamp:
01/25/2011 09:11:32 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Fix default search string regression from r3917

Location:
trunk/bp-core
Files:
2 edited

Legend:

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

    r3917 r3918  
    102102            'root_slug'             => '',
    103103            'notification_callback' => '',
    104             'global_tables'         => ''
     104            'search_string'         => '',
     105            'global_tables'         => '',
    105106        );
    106107        $r = wp_parse_args( $args, $defaults );
    107108
    108109        // Slug used for permalinks
    109         $this->slug      = apply_filters( 'bp_' . $this->id . '_slug',      $r['slug']      );
     110        $this->slug          = apply_filters( 'bp_' . $this->id . '_slug',          $r['slug']          );
    110111
    111112        // Slug used for root directory
    112         $this->root_slug = apply_filters( 'bp_' . $this->id . '_root_slug', $r['root_slug'] );
     113        $this->root_slug     = apply_filters( 'bp_' . $this->id . '_root_slug',     $r['root_slug']     );
     114
     115        // Search string
     116        $this->search_string = apply_filters( 'bp_' . $this->id . '_search_string', $r['search_string'] );
    113117
    114118        // Notifications callback
  • trunk/bp-core/bp-core-template.php

    r3917 r3918  
    354354
    355355        // Most of the time, $component will be the actual component ID
    356         if ( !empty( $bp->{$component}->default_search_string ) ) {
    357             $default_text = $bp->{$component}->default_search_string;
     356        if ( !empty( $bp->{$component}->search_string ) ) {
     357            $default_text = $bp->{$component}->search_string;
    358358        } else {
    359359            // When the request comes through AJAX, we need to get the component
     
    361361            if ( !empty( $bp->pages->{$component}->slug ) ) {
    362362                $key = $bp->pages->{$component}->slug;
    363                 if ( !empty( $bp->{$key}->default_search_string ) )
    364                     $default_text = $bp->{$key}->default_search_string;
     363                if ( !empty( $bp->{$key}->search_string ) )
     364                    $default_text = $bp->{$key}->search_string;
    365365            }
    366366        }
Note: See TracChangeset for help on using the changeset viewer.