<?php
/**
 * This file is used to markup the filter field radio.
 *
 * @since      1.0
 *
 * @package    SiteEase_Smart_Product_Filtering_Engine
 * @subpackage SiteEase_Smart_Product_Filtering_Engine/public/partials/fields
 */

// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<?php if ( isset( $field['name'] ) && !empty( $field['name'] ) && isset( $field['label'] ) && !empty( $field['label'] )) { ?>
	<?php
	$field_id = ( !empty( $field['id'] ) ) ? $field['id'] : "radio_".$field['value_attribute'];
	?>
	<input type="radio" name="<?php echo esc_attr($field['name']); ?>"
	id="<?php echo esc_attr( $field_id ); ?>"
	style="<?php echo esc_attr( $field['css'] ); ?>"
	class="<?php echo esc_attr( $field['class'] ); ?>"
	<?php echo wp_kses_data(implode( ' ', $field['custom_attributes'] )); ?> value="<?php echo esc_attr($field['value_attribute']); ?>" 
	<?php if ( $field['checked'] === true ) echo esc_attr( 'checked' ); ?>>
	<label class="ifqpf-checkbox-label" for="<?php echo esc_attr($field_id); ?>"><?php echo esc_html($field['label']) ?></label>
<?php } ?>