Description
This filter allows you to pass arguments to change defaults for the User List search form.
Parameters
$args
(array) (required) An array of arguments that are to override form $defaults.
$defaults = array( // HTML wrappers. 'heading_before' => '<legend>', 'heading_after' => '</legend>', 'fieldset_before' => '<fieldset>', 'fieldset_after' => '</fieldset>', 'main_div_before' => '<div id="wpmem_ul_search">', 'main_div_after' => '</div>', 'row_before' => '', 'row_after' => '', 'buttons_before' => '<div class="button_div">', 'buttons_after' => '</div>', 'results_before' => '<h2>', 'results_after' => '</h2>', 'link_before' => '<p>', 'link_after' => '</p>', // CSS classes & ids. 'form_id' => 'wpmem_search_form', 'form_class' => 'form', 'button_id' => 'wpmem_searchsubmit', 'button_class' => 'buttons', 'results_term' => 'results-term', // Labels. 'heading' => __( 'Search Members', 'wp-members-ul' ), 'search_for' => __( 'Search for:', 'wp-members-ul' ), 'search_by' => __( 'Search by:', 'wp-members-ul' ), 'button_text' => __( 'Search', 'wp-members-ul' ), 'results_heading' => __( 'Search Results For:', 'wp-members-ul' ), 'results_link' => __( 'Back To Member Listing', 'wp-members-ul' ), 'default_search' => __( 'Choose from list', 'wp-members-ul' ), 'default_results' => __( 'You did not specify a search field. If you specify a field to search from the "Search by" list, you will get more relevant results.', 'wp-members-ul' ), // Other. 'strip_breaks' => true, 'wrap_inputs' => true, );
Usage
This filter can be used to change any or all of the default values. Specify the array key and the value.
add_filter( 'wpmem_ul_search_args', 'my_search_args' ); function my_search_args( $args ) { /* * Make changes to any defaults. * Specify the key and the value * as follows: */ $args['heading'] = "My Heading"; // Return the filtered result. return $args; }
Notes
Keep in mind that when changing HTML tags, if the tag is changed, such as changing a tag from “div” to “span,” you must also change the closing tag.
Source
wpmem_ul_search_args is located in includes/class-wp-members-user-list-forms.php