Skip to:
Content

BuddyPress.org

Ticket #4974: 4974.3.diff

File 4974.3.diff, 2.6 KB (added by dimensionmedia, 11 years ago)
  • bp-blogs/bp-blogs-template.php

     
    794794function bp_directory_blogs_search_form() {
    795795
    796796        $default_search_value = bp_get_search_default_text();
    797         $search_value         = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value; ?>
     797        $search_value         = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value;
     798       
     799        $search_form_html = '<form action="" method="get" id="search-blogs-form">
     800                <label><input type="text" name="s" id="blogs_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
     801                <input type="submit" id="blogs_search_submit" name="blogs_search_submit" value="' . __( 'Search', 'buddypress' ) . '" />
     802        </form>';
     803       
     804        echo apply_filters( 'bp_directory_blogs_search_form', $search_form_html );     
    798805
    799         <form action="" method="get" id="search-blogs-form">
    800                 <label><input type="text" name="s" id="blogs_search" placeholder="<?php echo esc_attr( $search_value ) ?>" /></label>
    801                 <input type="submit" id="blogs_search_submit" name="blogs_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
    802         </form>
    803 
    804 <?php
     806       
    805807}
    806808
    807809/**
  • bp-forums/bp-forums-template.php

     
    13211321        global $bp;
    13221322
    13231323        $default_search_value = bp_get_search_default_text( 'forums' );
    1324         $search_value = !empty( $_REQUEST['fs'] ) ? stripslashes( $_REQUEST['fs'] ) : $default_search_value;  ?>
     1324        $search_value = !empty( $_REQUEST['fs'] ) ? stripslashes( $_REQUEST['fs'] ) : $default_search_value; 
    13251325
    1326         <form action="" method="get" id="search-forums-form">
    1327                 <label><input type="text" name="s" id="forums_search" placeholder="<?php echo esc_attr( $search_value ); ?>" /></label>
    1328                 <input type="submit" id="forums_search_submit" name="forums_search_submit" value="<?php _e( 'Search', 'buddypress' ); ?>" />
    1329         </form>
     1326        $search_form_html = '<form action="" method="get" id="search-forums-form">
     1327                <label><input type="text" name="s" id="forums_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
     1328                <input type="submit" id="forums_search_submit" name="forums_search_submit" value="' . __( 'Search', 'buddypress' ) . '" />
     1329        </form>';
     1330       
     1331        echo apply_filters( 'bp_directory_forums_search_form', $search_form_html );     
    13301332
    1331 <?php
     1333
    13321334}
    13331335
    13341336function bp_forum_permalink( $forum_id = 0 ) {