';
build_heading( $item, $is_widget );
build_description( $item );
echo '
';
// build checkboxes
$count = 0;
foreach ( (array) $item['options'] as $choice_value => $choice ) {
$choice_id = esc_attr( $id ) . '-' . $count;
// collecting attributes
$atts = array();
$atts['type'] = 'radio';
$atts['id'] = $choice_id;
$atts['name'] = esc_attr( $item['name'] );
$atts['value'] = esc_attr( $choice_value );
if( (string) $value === (string) $choice_value )
$atts['checked'] = 'checked';
$choice_title = isset( $choice['title'] ) ? '
' . esc_attr( $choice['title'] ) . '' : '';
printf(
'
',
esc_attr( $choice_id ), spyropress_build_atts( $atts ), $choice_title,
esc_url( $choice['img'] ), ( $value == $choice_value ) ? ' selected' : ''
);
$count++;
}
echo '