Custom sort box (radio) — event handlers not included

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

add_filter( ‘facetwp_sort_html’, function( $html, $params ) {
$html = ‘<div class=”facetwp-sort-radio”>’;
foreach ( $params[‘sort_options’] as $key => $atts ) {
$html .= ‘<input type=”radio” value=”‘ . esc_attr( $key ) . ‘” /><label>’ . esc_html( $atts[‘label’] ) . ‘</label>’;
}
$html .= ‘</div>’;
return $html;
}, 10, 2 );

{{/gist}}