Changeset 12183
- Timestamp:
- 07/07/2018 09:44:24 PM (7 years ago)
- Location:
- branches/3.0/src/bp-templates/bp-nouveau
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/src/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/index.php
r12157 r12183 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> -
branches/3.0/src/bp-templates/bp-nouveau/includes/messages/functions.php
r12157 r12183 141 141 * @since 3.0.0 142 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.0156 *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 /**164 * @since 3.0.0165 */166 143 function bp_nouveau_messages_adjust_nav() { 167 144 $bp = buddypress(); -
branches/3.0/src/bp-templates/bp-nouveau/includes/messages/template-tags.php
r12082 r12183 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 } -
branches/3.0/src/bp-templates/bp-nouveau/includes/template-tags.php
r12157 r12183 1846 1846 */ 1847 1847 function bp_nouveau_search_form() { 1848 bp_get_template_part( 'common/search/search-form');1848 $search_form_html = bp_buffer_template_part( 'common/search/search-form', null, false ); 1849 1849 1850 1850 $objects = bp_nouveau_get_search_objects(); 1851 1851 if ( empty( $objects['primary'] ) || empty( $objects['secondary'] ) ) { 1852 echo $search_form_html; 1852 1853 return; 1853 1854 } 1854 1855 1855 1856 if ( 'dir' === $objects['primary'] ) { 1857 /** 1858 * Filter here to edit the HTML output of the directory search form. 1859 * 1860 * NB: This will take in charge the following BP Core Components filters 1861 * - bp_directory_members_search_form 1862 * - bp_directory_blogs_search_form 1863 * - bp_directory_groups_search_form 1864 * 1865 * @since 1.9.0 1866 * 1867 * @param string $search_form_html The HTML output for the directory search form. 1868 */ 1869 echo apply_filters( "bp_directory_{$objects['secondary']}_search_form", $search_form_html ); 1870 1856 1871 if ( 'activity' === $objects['secondary'] ) { 1857 1872 /**
Note: See TracChangeset
for help on using the changeset viewer.