Skip to:
Content

BuddyPress.org

Ticket #4974: 4974.2.diff

File 4974.2.diff, 3.6 KB (added by dimensionmedia, 11 years ago)
  • bp-members/bp-members-template.php

     
    703703function bp_directory_members_search_form() {
    704704
    705705        $default_search_value = bp_get_search_default_text( 'members' );
    706         $search_value         = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value; ?>
     706        $search_value         = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value;
    707707
    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
     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
     716
    716717function bp_total_site_member_count() {
    717718        echo bp_get_total_site_member_count();
    718719}
  • bp-groups/bp-groups-template.php

     
    884884        $label = __('Filter Groups', 'buddypress');
    885885        $name = 'group-filter-box';
    886886
    887 ?>
    888         <form action="<?php echo $action ?>" id="group-search-form" method="post">
    889                 <label for="<?php echo $name ?>" id="<?php echo $name ?>-label"><?php echo $label ?></label>
    890                 <input type="search" name="<?php echo $name ?>" id="<?php echo $name ?>" value="<?php echo $value ?>"<?php echo $disabled ?> />
     887        $search_form_html = '<form action="' . $action . '" id="group-search-form" method="post">
     888                <label for="'. $name .'" id="'. $name .'-label">'. $label .'</label>
     889                <input type="search" name="'. $name . '" id="'. $name .'" value="'. $value .'"'.  $disabled .' />
    891890
    892                 <?php wp_nonce_field( 'group-filter-box', '_wpnonce_group_filter' ) ?>
    893         </form>
    894 <?php
     891                '. wp_nonce_field( 'group-filter-box', '_wpnonce_group_filter', true, false ) .'
     892                </form>';
     893               
     894        echo apply_filters( 'bp_group_search_form', $search_form_html );       
    895895}
    896896
    897897function bp_group_show_no_groups_message() {
     
    24962496function bp_directory_groups_search_form() {
    24972497
    24982498        $default_search_value = bp_get_search_default_text( 'groups' );
    2499         $search_value         = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value; ?>
     2499        $search_value         = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value;
    25002500
    2501         <form action="" method="get" id="search-groups-form">
    2502                 <label><input type="text" name="s" id="groups_search" placeholder="<?php echo esc_attr( $search_value ) ?>" /></label>
    2503                 <input type="submit" id="groups_search_submit" name="groups_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
    2504         </form>
    2505 
    2506 <?php
     2501        $search_form_html = '<form action="" method="get" id="search-groups-form">
     2502                <label><input type="text" name="s" id="groups_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
     2503                <input type="submit" id="groups_search_submit" name="groups_search_submit" value="'. _e( 'Search', 'buddypress' ) .'" />
     2504        </form>';
     2505       
     2506        echo apply_filters( 'bp_directory_groups_search_form', $search_form_html );
     2507       
    25072508}
    25082509
    25092510/**