Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/30/2010 10:13:05 PM (14 years ago)
Author:
boonebgorges
Message:

Replaces generic 'Search anything' default directory search text with component-specific text. Fixes #1915. Fixes ->forums->slug so that it is properly set in the bp_pages way

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-templatetags.php

    r3616 r3627  
    505505    global $bp;
    506506
    507     $search_value = __( 'Search anything...', 'buddypress' );
    508     if ( !empty( $_GET['s'] ) )
    509         $search_value = stripslashes( $_GET['s'] );
     507    $default_search_value = bp_get_search_default_text();
     508    $search_value = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value;
    510509
    511510    ?>
    512511    <form action="" method="get" id="search-blogs-form">
    513         <label><input type="text" name="s" id="blogs_search" value="<?php echo esc_attr( $search_value ) ?>"  onfocus="if (this.value == '<?php _e( 'Search anything...', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search anything...', 'buddypress' ) ?>';}" /></label>
     512        <label><input type="text" name="s" id="blogs_search" value="<?php echo esc_attr( $search_value ) ?>"  onfocus="if (this.value == '<?php echo $default_search_value ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php echo $default_search_value ?>';}" /></label>
    514513        <input type="submit" id="blogs_search_submit" name="blogs_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
    515514    </form>
Note: See TracChangeset for help on using the changeset viewer.