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-groups/bp-groups-templatetags.php

    r3616 r3627  
    18721872    global $bp;
    18731873
    1874     $search_value = __( 'Search anything...', 'buddypress' );
    1875     if ( !empty( $_REQUEST['s'] ) )
    1876         $search_value = stripslashes( $_REQUEST['s'] );
     1874    $default_search_value = bp_get_search_default_text();
     1875    $search_value = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value;
    18771876
    18781877?>
    18791878    <form action="" method="get" id="search-groups-form">
    1880         <label><input type="text" name="s" id="groups_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>
     1879        <label><input type="text" name="s" id="groups_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>
    18811880        <input type="submit" id="groups_search_submit" name="groups_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
    18821881    </form>
Note: See TracChangeset for help on using the changeset viewer.