-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathfunctions-messages.php
38 lines (25 loc) · 1.06 KB
/
functions-messages.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/*
* functions-messages.php
*
* Specific modifications to update BuddyPress message search forms, etc.
*
*
*/
/**
* Function to replace private message search form with same HTML with Twitter Bootstrap
*
* @return text HTML content
**/
function bs_bp_message_search_form() {
$default_search_value = bp_get_search_default_text( 'messages' );
$search_value = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value; ?>
<form action="" method="get" id="search-message-form">
<div class="input-append">
<input type="text" class="span2 search-query" name="s" id="messages_search" <?php if ( $search_value === $default_search_value ) : ?>placeholder="<?php echo esc_html( $search_value ); ?>"<?php endif; ?> <?php if ( $search_value !== $default_search_value ) : ?>value="<?php echo esc_html( $search_value ); ?>"<?php endif; ?> />
<input type="submit" class="btn btn-success" id="messages_search_submit" name="messages_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
</div>
</form>
<?php
}
?>