Skip to content

Commit

Permalink
bug fix radio button $_GET not setting
Browse files Browse the repository at this point in the history
  • Loading branch information
RensTillmann committed May 16, 2019
1 parent f80c2da commit 6e90c18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/includes/class-shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public static function get_items($items=array(), $tag, $atts, $prefix='', $setti
if( $v['max_width']!='' ) $img_styles .= 'max-width:' . $v['max_width'] . 'px;';
if( $v['max_height']!='' ) $img_styles .= 'max-height:' . $v['max_height'] . 'px;';

$item = '<label class="' . ( (in_array($v['value'], $selected_items)) && ($selected_found==false) ? 'super-has-image super-active super-default-selected' : 'super-has-image' ) . ($atts['class']!='' ? ' ' . $atts['class'] : '') . '">';
$item = '<label class="' . ( $v['value']==$atts['value'] ? 'super-has-image super-active super-default-selected' : 'super-has-image' ) . ($atts['class']!='' ? ' ' . $atts['class'] : '') . '">';
if( !empty( $image ) ) {
$item .= '<div class="image" style="background-image:url(\'' . $image . '\');"><img src="' . $image . '"' . ($img_styles!='' ? ' style="' . $img_styles . '"' : '') . '></div>';
}else{
Expand All @@ -259,7 +259,7 @@ public static function get_items($items=array(), $tag, $atts, $prefix='', $setti
$item .='</label>';
$items[] = $item;
}else{
$items[] = '<label class="' . ( (in_array($v['value'], $selected_items)) && ($selected_found==false) ? 'super-active super-default-selected' : '' ) . ($atts['class']!='' ? ' ' . $atts['class'] : '') . '"><input ' . ( (($v['checked']!=='true') && ($v['checked']!==true)) ? '' : 'checked="checked"' ) . ' type="radio" value="' . esc_attr( $v['value'] ) . '" />' . stripslashes($v['label']) . '</label>';
$items[] = '<label class="' . ( $v['value']==$atts['value'] ? 'super-active super-default-selected' : '' ) . ($atts['class']!='' ? ' ' . $atts['class'] : '') . '"><input ' . ( (($v['checked']!=='true') && ($v['checked']!==true)) ? '' : 'checked="checked"' ) . ' type="radio" value="' . esc_attr( $v['value'] ) . '" />' . stripslashes($v['label']) . '</label>';
}
if( in_array($v['value'], $selected_items)) $selected_found = true;
}
Expand Down

0 comments on commit 6e90c18

Please sign in to comment.