'."\n" . '
'."\n";
}
//End Heading
$select_value = '';
switch ( $value['type'] ) {
case 'text':
$val = $value['std'];
$std = revealpro_get_option($value['id']);
if ( $std != "") { $val = $std; }
$safe_text = sanitize_text_field ($val);
$output .= '
';
break;
case 'select':
$output .= '
';
break;
case 'textarea':
$cols = '8';
$ta_value = '';
if(isset($value['std'])) {
$ta_value = $value['std'];
if(isset($value['options'])){
$ta_options = $value['options'];
if(isset($ta_options['cols'])){
$cols = $ta_options['cols'];
} else { $cols = '8'; }
}
}
$std = revealpro_get_option($value['id']);
if( $std != "") { $ta_value = stripslashes( $std ); }
$safe_string = sanitize_text_field ($ta_value);
$output .= '
';
break;
case 'texteditor':
$cols = '8';
$ta_value = '';
if(isset($value['std'])) {
$ta_value = $value['std'];
if(isset($value['options'])){
$ta_options = $value['options'];
if(isset($ta_options['cols'])){
$cols = $ta_options['cols'];
} else { $cols = '8'; }
}
}
$std = revealpro_get_option($value['id']);
if( $std != "") { $ta_value = stripslashes( $std ); }
$output .= '
';
break;
case "radio":
$select_value = revealpro_get_option( $value['id']);
foreach ($value['options'] as $key => $option)
{
$checked = '';
if($select_value != '') {
if ( $select_value == $key) { $checked = ' checked'; }
} else {
if ($value['std'] == $key) { $checked = ' checked'; }
}
$output .= '
' . $option . '
';
}
break;
case "checkbox":
$output .= '
';
$output .= '
';
break;
case "multicheck":
foreach ($value['options'] as $key => $option) {
$checked = '';
$label = $option;
$option = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($key));
$id = $option_name . '-' . $value['id'] . '-' . $option;
$name = $option_name . '[' . $value['id'] . '][' . $option . ']';
if (isset($val[$option])) {
$checked = checked($val[$option], 1, false);
}
$output .= '
';
}
break;
case "upload":
$value['std'] = '';
if (isset($value['std'])){
$output .= revealpro_optionsframework_uploader_function($value['id'],$value['std'],null);
}
break;
case "upload_min":
$output .= revealpro_optionsframework_uploader_function($value['id'],$value['std'],'min');
break;
case "color":
$val = $value['std'];
$stored = revealpro_get_option( $value['id'] );
if ( $stored != "") { $val = $stored; }
$output .= '
';
$output .= '
';
break;
case "typography":
$default = $value['std'];
$typography_stored = revealpro_get_option($value['id']);
/* Font Size */
$val = $default['size'];
if ( $typography_stored['size'] != "") { $val = $typography_stored['size']; }
$output .= '
';
/* Font Face */
$val = $default['face'];
if ( $typography_stored['face'] != "")
$val = $typography_stored['face'];
$font01 = '';
$font02 = '';
$font03 = '';
$font04 = '';
$font05 = '';
$font06 = '';
$font07 = '';
$font08 = '';
$font09 = '';
if (strpos($val, 'Arial, sans-serif') !== false){ $font01 = 'selected="selected"'; }
if (strpos($val, 'Verdana, Geneva') !== false){ $font02 = 'selected="selected"'; }
if (strpos($val, 'Trebuchet') !== false){ $font03 = 'selected="selected"'; }
if (strpos($val, 'Georgia') !== false){ $font04 = 'selected="selected"'; }
if (strpos($val, 'Times New Roman') !== false){ $font05 = 'selected="selected"'; }
if (strpos($val, 'Tahoma, Geneva') !== false){ $font06 = 'selected="selected"'; }
if (strpos($val, 'Palatino') !== false){ $font07 = 'selected="selected"'; }
if (strpos($val, 'Helvetica') !== false){ $font08 = 'selected="selected"'; }
$output .= '
';
/* Font Weight */
$val = $default['style'];
if ( $typography_stored['style'] != "") { $val = $typography_stored['style']; }
$normal = ''; $italic = ''; $bold = ''; $bolditalic = '';
if($val == 'normal'){ $normal = 'selected="selected"'; }
if($val == 'italic'){ $italic = 'selected="selected"'; }
if($val == 'bold'){ $bold = 'selected="selected"'; }
if($val == 'bold italic'){ $bolditalic = 'selected="selected"'; }
$output .= '
';
/* Font Color */
$val = $default['color'];
if ( $typography_stored['color'] != "") { $val = $typography_stored['color']; }
$output .= '
';
$output .= '
';
break;
case "border":
$default = $value['std'];
$border_stored = revealpro_get_option( $value['id'] );
/* Border Width */
$val = $default['width'];
if ( $border_stored['width'] != "") { $val = $border_stored['width']; }
$output .= '
';
/* Border Style */
$val = $default['style'];
if ( $border_stored['style'] != "") { $val = $border_stored['style']; }
$solid = ''; $dashed = ''; $dotted = '';
if($val == 'solid'){ $solid = 'selected="selected"'; }
if($val == 'dashed'){ $dashed = 'selected="selected"'; }
if($val == 'dotted'){ $dotted = 'selected="selected"'; }
$output .= '
';
/* Border Color */
$val = $default['color'];
if ( $border_stored['color'] != "") { $val = $border_stored['color']; }
$output .= '
';
$output .= '
';
break;
case "images":
$name = $option_name . '[' . $value['id'] . ']';
foreach ($value['options'] as $key => $option) {
$selected = '';
$checked = '';
if ($val != '') {
if ($val == $key) {
$selected = ' of-radio-img-selected';
}
checked( $options['$key'],$val);
}
$output .= '
';
$output .= '
' . esc_html($key) . '
';
$output .= '
';
}
break;
case "info":
$default = $value['std'];
$output .= $default;
break;
case "heading":
if($counter >= 2){
$output .= '
'."\n";
}
$jquery_click_hook = preg_replace("/[^a-zA-Z0-9._\-]/", "", strtolower($value['name']) );
$jquery_click_hook = "of-option-" . $jquery_click_hook;
$menu .= '
'. $explain_value .'