Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/07/2018 09:48:52 PM (7 years ago)
Author:
imath
Message:

BP Nouveau: bring back search form filters

Although it was already possible to override search form templates, as the following search form filters are not Legacy filters but Core components ones, we are bringing them back into the Nouveau template pack:

  • bp_directory_members_search_form
  • bp_directory_blogs_search_form
  • bp_directory_groups_search_form
  • bp_message_search_form

Props wbcomdesigns, DJPaul, vapvarun

Fixes #7881 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/messages/functions.php

    r12156 r12184  
    141141 * @since 3.0.0
    142142 */
    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 /**
    164  * @since 3.0.0
    165  */
    166143function bp_nouveau_messages_adjust_nav() {
    167144    $bp = buddypress();
Note: See TracChangeset for help on using the changeset viewer.