' . "\n" . '
' . "\n";
}
//End Heading
$select_value = '';
switch ( $value['type'] ) {
case 'text':
$val = isset( $value['std'] ) ? $value['std'] : '';
$std = bd_get_option( $value['id'] );
if ( $std != "" ) {
$val = $std;
}
$output .= '
';
break;
case 'select':
$output .= '
';
$select_value = bd_get_option( $value['id'] );
foreach ( $value['options'] as $option ) {
$selected = '';
if ( $select_value != '' ) {
if ( $select_value == $option ) {
$selected = ' selected="selected"';
}
} else {
if ( isset( $value['std'] ) )
if ( $value['std'] == $option ) {
$selected = ' selected="selected"';
}
}
$output .= '';
$output .= $option;
$output .= ' ';
}
$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 = bd_get_option( $value['id'] );
if ( $std != "" ) {
$ta_value = stripslashes( $std );
}
$output .= '
';
break;
case "radio":
$select_value = bd_get_option( $value['id'] );
foreach ( $value['options'] as $key => $option ) {
$checked = '';
if ( $select_value != '' ) {
if ( $select_value == $key ) {
$checked = 'checked="checked"';
}
} else {
if ( $value['std'] == $key ) {
$checked = 'checked="checked"';
}
}
$output .= '
' . $option . '
';
}
break;
case "checkbox":
$output .= '
';
$output .= '
' . wp_kses( $explain_value, $allowedtags ) . ' ';
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 .= '
' . esc_html( $label ) . ' ';
}
break;
case "upload":
$value['std'] = '';
if ( isset( $value['std'] ) ) {
$output .= bd_optionsframework_uploader_function( $value['id'], $value['std'], null );
}
break;
case "upload_min":
$output .= bd_optionsframework_uploader_function( $value['id'], $value['std'], 'min' );
break;
case "color":
$val = $value['std'];
$stored = bd_get_option( $value['id'] );
if ( $stored != "" ) {
$val = $stored;
}
$output .= '
';
$output .= '
';
break;
case "typography":
$default = $value['std'];
$typography_stored = bd_get_option( $value['id'] );
/* Font Size */
$val = $default['size'];
if ( $typography_stored['size'] != "" ) {
$val = $typography_stored['size'];
}
$output .= '
';
for ( $i = 9; $i < 71; $i++ ) {
if ( $val == $i ) {
$active = 'selected="selected"';
} else {
$active = '';
}
$output .= '' . $i . 'px ';
}
$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 .= '
';
$output .= 'Arial ';
$output .= 'Verdana ';
$output .= 'Trebuchet ';
$output .= 'Georgia ';
$output .= 'Times New Roman ';
$output .= 'Tahoma ';
$output .= 'Palatino ';
$output .= 'Helvetica* ';
$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 .= '
';
$output .= 'Normal ';
$output .= 'Italic ';
$output .= 'Bold ';
$output .= 'Bold/Italic ';
$output .= ' ';
/* Font Color */
$val = $default['color'];
if ( $typography_stored['color'] != "" ) {
$val = $typography_stored['color'];
}
$output .= '
';
$output .= '
';
break;
case "border":
$default = $value['std'];
$border_stored = bd_get_option( $value['id'] );
/* Border Width */
$val = $default['width'];
if ( $border_stored['width'] != "" ) {
$val = $border_stored['width'];
}
$output .= '
';
for ( $i = 0; $i < 21; $i++ ) {
if ( $val == $i ) {
$active = 'selected="selected"';
} else {
$active = '';
}
$output .= '' . $i . 'px ';
}
$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 .= '
';
$output .= 'Solid ';
$output .= 'Dashed ';
$output .= 'Dotted ';
$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 . '
' . "\n";
$output .= '