removed edit page in settings + manage subscription update

This commit is contained in:
Jonathan Labreuille
2016-03-16 09:56:07 +01:00
parent 72882aaf2b
commit e28451d410
6 changed files with 25 additions and 40 deletions

View File

@ -25,18 +25,24 @@ class Radio extends Base {
$html .= 'name="'.$field_name.'" ';
$html .= 'value="'.esc_attr($option['value']).'" ';
if(is_array($option['value'])) {
$value = key($option['value']);
$label = reset($option['value']);
} else {
$value = $option['value'];
$label = $option['value'];
}
$html .= 'value="'.esc_attr($value).'" ';
$html .= (
(isset($option['is_checked']) && $option['is_checked'])
||
(self::getFieldValue($block) === $option['value'])
(self::getFieldValue($block) === $value)
) ? 'checked="checked"' : '';
$html .= $field_validation;
$html .= ' /> '.esc_attr($option['value']);
$html .= ' /> '.esc_attr($label);
$html .= '</label>';
}

View File

@ -18,7 +18,12 @@ class Select extends Base {
$html .= '<option value="">'.static::getFieldLabel($block).'</option>';
}
foreach($block['params']['values'] as $option) {
$options = (!empty($block['params']['values'])
? $block['params']['values']
: array()
);
foreach($options as $option) {
$is_selected = (
(isset($option['is_checked']) && $option['is_checked'])
||