Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/31/2013 01:09:04 PM (11 years ago)
Author:
boonebgorges
Message:

Adds filters to search form HTML functions

Filters introduced in bp_directory_members_search_form(),
bp_directory_groups_search_form(), and bp_group_search_form() allow theme
and plugin authors more flexibility with core-generated search form HTML.

Fixes #4974

Props dimensionmedia

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-template.php

    r7228 r7328  
    704704
    705705    $default_search_value = bp_get_search_default_text( 'members' );
    706     $search_value         = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value; ?>
    707 
    708     <form action="" method="get" id="search-members-form">
    709         <label><input type="text" name="s" id="members_search" placeholder="<?php echo esc_attr( $search_value ) ?>" /></label>
    710         <input type="submit" id="members_search_submit" name="members_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
    711     </form>
    712 
    713 <?php
     706    $search_value         = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value;
     707
     708    $search_form_html = '<form action="" method="get" id="search-members-form">
     709        <label><input type="text" name="s" id="members_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
     710        <input type="submit" id="members_search_submit" name="members_search_submit" value="' . _e( 'Search', 'buddypress' ) . '" />
     711    </form>';
     712
     713    echo apply_filters( 'bp_directory_members_search_form', $search_form_html );
    714714}
    715715
Note: See TracChangeset for help on using the changeset viewer.