Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Demonstrates setting the search element type for the Participants Database Combo Multi-Search add-on
<?php
// this sets the type of control to use when building the multi search control
add_filter( 'pdb-combo-multisearch-search_control_type', 'xnau_set_search_control_type', 10, 2 );
// this sets the field type for the purpose of adding the search as a query filter
add_filter( 'pdbmps-field-filter', 'xnau_set_search_control_type', 10, 2 );
function xnau_set_search_control_type( $form_element, $field )
{
if ( $field->name === 'state' ) {
$form_element = 'multi-checkbox';
}
return $form_element;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment