diff --git src/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/index.php src/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/index.php
index 8aa71cf83..ac0b5a842 100644
|
|
|
|
| 93 | 93 | <script type="text/html" id="tmpl-bp-messages-filters"> |
| 94 | 94 | <li class="user-messages-search" role="search" data-bp-search="{{data.box}}"> |
| 95 | 95 | <div class="bp-search messages-search"> |
| 96 | | <form action="" method="get" id="user_messages_search_form" class="bp-messages-search-form" data-bp-search="messages"> |
| 97 | | <label for="user_messages_search" class="bp-screen-reader-text"> |
| 98 | | <?php _e( 'Search Messages', 'buddypress' ); ?> |
| 99 | | </label> |
| 100 | | <input type="search" id="user_messages_search" placeholder="<?php echo esc_attr_x( 'Search', 'search placeholder text', 'buddypress' ); ?>"/> |
| 101 | | <button type="submit" id="user_messages_search_submit"> |
| 102 | | <span class="dashicons dashicons-search" aria-hidden="true"></span> |
| 103 | | <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Search', 'button', 'buddypress' ); ?></span> |
| 104 | | </button> |
| 105 | | </form> |
| | 96 | <?php bp_nouveau_message_search_form(); ?> |
| 106 | 97 | </div> |
| 107 | 98 | </li> |
| 108 | 99 | <li class="user-messages-bulk-actions"></li> |
diff --git src/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/search-form.php src/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/search-form.php
index e69de29bb..bff11037c 100644
|
|
|
|
| | 1 | <?php |
| | 2 | /** |
| | 3 | * BP Nouveau Messages search form template. |
| | 4 | * |
| | 5 | * @since 3.2.0 |
| | 6 | * @version 3.2.0 |
| | 7 | */ |
| | 8 | ?> |
| | 9 | <form action="" method="get" id="user_messages_search_form" class="bp-messages-search-form" data-bp-search="messages"> |
| | 10 | <label for="user_messages_search" class="bp-screen-reader-text"> |
| | 11 | <?php _e( 'Search Messages', 'buddypress' ); ?> |
| | 12 | </label> |
| | 13 | <input type="search" id="user_messages_search" placeholder="<?php echo esc_attr_x( 'Search', 'search placeholder text', 'buddypress' ); ?>"/> |
| | 14 | <button type="submit" id="user_messages_search_submit"> |
| | 15 | <span class="dashicons dashicons-search" aria-hidden="true"></span> |
| | 16 | <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Search', 'button', 'buddypress' ); ?></span> |
| | 17 | </button> |
| | 18 | </form> |
diff --git src/bp-templates/bp-nouveau/includes/messages/functions.php src/bp-templates/bp-nouveau/includes/messages/functions.php
index 8e697cd6b..93cfaab2e 100644
|
|
|
function bp_nouveau_messages_localize_scripts( $params = array() ) {
|
| 137 | 137 | return $params; |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | | /** |
| 141 | | * @since 3.0.0 |
| 142 | | */ |
| 143 | | function bp_nouveau_message_search_form() { |
| 144 | | $query_arg = bp_core_get_component_search_query_arg( 'messages' ); |
| 145 | | $placeholder = bp_get_search_default_text( 'messages' ); |
| 146 | | |
| 147 | | $search_form_html = '<form action="" method="get" id="search-messages-form"> |
| 148 | | <label for="messages_search"><input type="text" name="' . esc_attr( $query_arg ) . '" id="messages_search" placeholder="' . esc_attr( $placeholder ) . '" /></label> |
| 149 | | <input type="submit" id="messages_search_submit" name="messages_search_submit" value="' . esc_attr_x( 'Search', 'button', 'buddypress' ) . '" /> |
| 150 | | </form>'; |
| 151 | | |
| 152 | | /** |
| 153 | | * Filters the private message component search form. |
| 154 | | * |
| 155 | | * @since 3.0.0 |
| 156 | | * |
| 157 | | * @param string $search_form_html HTML markup for the message search form. |
| 158 | | */ |
| 159 | | echo apply_filters( 'bp_nouveau_message_search_form', $search_form_html ); |
| 160 | | } |
| 161 | | add_filter( 'bp_message_search_form', 'bp_nouveau_message_search_form', 10, 1 ); |
| 162 | | |
| 163 | 140 | /** |
| 164 | 141 | * @since 3.0.0 |
| 165 | 142 | */ |
diff --git src/bp-templates/bp-nouveau/includes/messages/template-tags.php src/bp-templates/bp-nouveau/includes/messages/template-tags.php
index 2176661f1..9dcc4ea64 100644
|
|
|
function bp_nouveau_messages_member_interface() {
|
| 61 | 61 | */ |
| 62 | 62 | do_action( 'bp_after_member_messages_content' ); |
| 63 | 63 | } |
| | 64 | |
| | 65 | /** |
| | 66 | * Output the Member's messages search form. |
| | 67 | * |
| | 68 | * @since 3.0.0 |
| | 69 | * @since 3.2.0 Move the function into Template Tags and use a template part. |
| | 70 | */ |
| | 71 | function bp_nouveau_message_search_form() { |
| | 72 | $search_form_html = bp_buffer_template_part( 'common/js-templates/messages/search-form', null, false ); |
| | 73 | |
| | 74 | /** |
| | 75 | * Filters the private message component search form. |
| | 76 | * |
| | 77 | * @since 2.2.0 |
| | 78 | * |
| | 79 | * @param string $search_form_html HTML markup for the message search form. |
| | 80 | */ |
| | 81 | echo apply_filters( 'bp_message_search_form', $search_form_html ); |
| | 82 | } |
diff --git src/bp-templates/bp-nouveau/includes/template-tags.php src/bp-templates/bp-nouveau/includes/template-tags.php
index 6526378aa..fb8984546 100644
|
|
|
function bp_nouveau_search_default_text( $text = '', $is_attr = true ) {
|
| 1849 | 1849 | * @since 3.0.0 |
| 1850 | 1850 | */ |
| 1851 | 1851 | function bp_nouveau_search_form() { |
| 1852 | | bp_get_template_part( 'common/search/search-form' ); |
| | 1852 | $search_form_html = bp_buffer_template_part( 'common/search/search-form', null, false ); |
| 1853 | 1853 | |
| 1854 | 1854 | $objects = bp_nouveau_get_search_objects(); |
| 1855 | 1855 | if ( empty( $objects['primary'] ) || empty( $objects['secondary'] ) ) { |
| | 1856 | echo $search_form_html; |
| 1856 | 1857 | return; |
| 1857 | 1858 | } |
| 1858 | 1859 | |
| 1859 | 1860 | if ( 'dir' === $objects['primary'] ) { |
| | 1861 | /** |
| | 1862 | * Filter here to edit the HTML output of the directory search form. |
| | 1863 | * |
| | 1864 | * NB: This will take in charge the following BP Core Components filters |
| | 1865 | * - bp_directory_members_search_form |
| | 1866 | * - bp_directory_blogs_search_form |
| | 1867 | * - bp_directory_groups_search_form |
| | 1868 | * |
| | 1869 | * @since 1.9.0 |
| | 1870 | * |
| | 1871 | * @param string $search_form_html The HTML output for the directory search form. |
| | 1872 | */ |
| | 1873 | echo apply_filters( "bp_directory_{$objects['secondary']}_search_form", $search_form_html ); |
| | 1874 | |
| 1860 | 1875 | if ( 'activity' === $objects['secondary'] ) { |
| 1861 | 1876 | /** |
| 1862 | 1877 | * Fires before the display of the activity syndication options. |