1102 | | <form action="" method="get" id="search-message-form"> |
1103 | | <label for="messages_search" class="bp-screen-reader-text"><?php _e( 'Search Messages', 'buddypress' ); ?></label> |
1104 | | <input type="text" 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; ?> /> |
1105 | | <input type="submit" id="messages_search_submit" name="messages_search_submit" value="<?php esc_attr_e( 'Search', 'buddypress' ) ?>" /> |
1106 | | </form> |
| 1102 | $message_placeholder = ( $search_value === $default_search_value ) ? ' placeholder="' . esc_attr( $search_value ) . '"' : '' ; |
| 1103 | $message_value = ( $search_value !== $default_search_value ) ? ' value="' . esc_attr( $search_value ) . '"' : '' ; |
1108 | | <?php |
| 1105 | $search_form_html = '<form action="" method="get" id="search-message-form">'; |
| 1106 | $search_form_html .= '<label for="messages_search" class="bp-screen-reader-text">' . __( 'Search Messages', 'buddypress' ) . '</label>'; |
| 1107 | $search_form_html .= '<input type="text" name="s" id="messages_search"' . $message_placeholder . $message_value . ' />'; |
| 1108 | $search_form_html .= '<input type="submit" id="messages_search_submit" name="messages_search_submit" value="' . __( 'Search', 'buddypress' ) . '" /></form>'; |
| 1109 | |
| 1110 | /** |
| 1111 | * Filters the private message component search form. |
| 1112 | * |
| 1113 | * @since BuddyPress (2.2.0) |
| 1114 | * |
| 1115 | * @param string $search_form_html HTML markup for the message search form. |
| 1116 | */ |
| 1117 | echo apply_filters( 'bp_message_search_form', $search_form_html ); |