Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/11/2013 08:11:43 PM (13 years ago)
Author:
boonebgorges
Message:

Adds filters to Blogs and Forums search form markup

Fixes #4974

Props dimensionmedia

File:
1 edited

Legend:

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

    r7235 r7345  
    792792}
    793793
     794/**
     795 * Echoes the blog directory search form
     796 */
    794797function bp_directory_blogs_search_form() {
    795 
    796798        $default_search_value = bp_get_search_default_text();
    797         $search_value         = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value; ?>
    798 
    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
     799        $search_value         = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value;
     800
     801        $search_form_html = '<form action="" method="get" id="search-blogs-form">
     802                <label><input type="text" name="s" id="blogs_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
     803                <input type="submit" id="blogs_search_submit" name="blogs_search_submit" value="' . __( 'Search', 'buddypress' ) . '" />
     804        </form>';
     805
     806        echo apply_filters( 'bp_directory_blogs_search_form', $search_form_html );
    805807}
    806808
Note: See TracChangeset for help on using the changeset viewer.