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

    r3616 r3627  
    10291029    global $bp;
    10301030
    1031     $search_value = __( 'Search anything...', 'buddypress' );
    1032     if ( !empty( $_REQUEST['fs'] ) )
    1033         $search_value = stripslashes( $_REQUEST['fs'] );
     1031    $default_search_value = bp_get_search_default_text();
     1032    $search_value = !empty( $_REQUEST['fs'] ) ? stripslashes( $_REQUEST['fs'] ) : $default_search_value;
    10341033
    10351034?>
    10361035    <form action="" method="get" id="search-forums-form">
    1037         <label><input type="text" name="s" id="forums_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>
     1036        <label><input type="text" name="s" id="forums_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>
    10381037        <input type="submit" id="forums_search_submit" name="forums_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
    10391038    </form>
Note: See TracChangeset for help on using the changeset viewer.