FacetWP – show a “Contains video” option

<?php

function fwp_contains_video( $params, $class ) {
    if ( 'contains_video' == $params['facet_name'] ) {
        if ( ! empty( $params['facet_value'] ) ) {
            $params['facet_value'] = 1;
            $params['facet_display_value'] = 'Contains Video';
        }
    }
    return $params;
}
add_filter( 'facetwp_index_row', 'fwp_contains_video', 10, 2 );