$taxonomy, 'hide_empty' => true, ); if ( ! empty( $facet['exclude_terms'] ) && is_array( $facet['exclude_terms'] ) ) { $term_args['exclude'] = array_values( array_filter( array_map( 'absint', $facet['exclude_terms'] ) ) ); } if ( ! empty( $facet['include_terms'] ) && is_array( $facet['include_terms'] ) ) { $term_args['include'] = array_values( array_filter( array_map( 'absint', $facet['include_terms'] ) ) ); } $terms = get_terms( $term_args ); if ( empty( $terms ) || is_wp_error( $terms ) ) { return ''; } $active_terms = ! empty( $runtime_params['facets'][ $taxonomy ] ) ? (array) $runtime_params['facets'][ $taxonomy ] : array(); $active_id = ! empty( $active_terms[0] ) ? absint( $active_terms[0] ) : 0; $radio_name = 'gm-radio-' . $grid_id . '-' . $taxonomy; ob_start(); ?>