Changeset 3627 for trunk/bp-blogs/bp-blogs-templatetags.php
- Timestamp:
- 12/30/2010 10:13:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-templatetags.php
r3616 r3627 505 505 global $bp; 506 506 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; 510 509 511 510 ?> 512 511 <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> 514 513 <input type="submit" id="blogs_search_submit" name="blogs_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" /> 515 514 </form>
Note: See TracChangeset
for help on using the changeset viewer.