Changeset 3511 for trunk/bp-blogs/bp-blogs-templatetags.php
- Timestamp:
- 12/04/2010 11:41:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-templatetags.php
r3481 r3511 503 503 504 504 function bp_directory_blogs_search_form() { 505 global $bp; ?> 505 global $bp; 506 507 $search_value = __( 'Search anything...', 'buddypress' ); 508 if ( !empty( $_GET['s'] ) ) 509 $search_value = stripslashes( $_GET['s'] ); 510 511 ?> 506 512 <form action="" method="get" id="search-blogs-form"> 507 <label><input type="text" name="s" id="blogs_search" value="<?php if ( isset( $_GET['s'] ) ) { echo $_GET['s']; } else { _e( 'Search anything...', 'buddypress' ); }?>" onfocus="if (this.value == '<?php _e( 'Search anything...', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search anything...', 'buddypress' ) ?>';}" /></label>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> 508 514 <input type="submit" id="blogs_search_submit" name="blogs_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" /> 509 515 </form>
Note: See TracChangeset
for help on using the changeset viewer.