$option_option) { salejunction_delete_option("{$option_id}_{$option_key}"); } } else if (is_array($option_type)) { foreach ($option_type as $inner_option) { $option_id = $inner_option['id']; salejunction_delete_option($option_id); } } else { salejunction_delete_option($option_id); } } } //When Theme Options page is reset - Add the of_options option if ($page == 'optionsframework') { salejunction_delete_option('of_options'); } } /* ----------------------------------------------------------------------------------- */ /* Build the Options Page - optionsframework_options_page */ /* ----------------------------------------------------------------------------------- */ function salejunction_optionsframework_options_page() { $options = salejunction_get_option('of_template'); $themename = salejunction_get_option('of_themename'); ?>

Get Nutrition Theme PRO!

You are using the Nutrition lite version theme. Upgrade to pro for extra features like home page slider, 3 column feature area, fullWidth page templates and many other, multiple color options, premium theme support and much more.

Upgrade to Nutrition PRO theme here >>
Options Updated
Options Reset
'; // COLOR Picker ?> $options_value) { $multicheck_id = $id . "_" . $options_id; if (!isset($output[$multicheck_id])) { salejunction_update_option($multicheck_id, 'false'); } else { salejunction_update_option($multicheck_id, 'true'); } } } elseif ($type == 'color') { salejunction_update_option($id, salejunction_validate_hex($new_value)); } elseif ($type == 'typography') { $typography_array = array(); $typography_array['size'] = $output[$option_array['id'] . '_size']; $typography_array['face'] = stripslashes($output[$option_array['id'] . '_face']); $typography_array['style'] = $output[$option_array['id'] . '_style']; $typography_array['color'] = $output[$option_array['id'] . '_color']; salejunction_update_option($id, $typography_array); } elseif ($type == 'border') { $border_array = array(); $border_array['width'] = $output[$option_array['id'] . '_width']; $border_array['style'] = $output[$option_array['id'] . '_style']; $border_array['color'] = $output[$option_array['id'] . '_color']; salejunction_update_option($id, $border_array); } elseif ($type != 'upload_min') { salejunction_update_option($id, stripslashes($new_value)); } } } } die(); } function salejunction_validate_hex($hex) { $hex = trim($hex); /* Strip recognized prefixes. */ if (0 === strpos($hex, '#')) { $hex = substr($hex, 1); } elseif (0 === strpos($hex, '%23')) { $hex = substr($hex, 3); } /* Regex match. */ if (0 === preg_match('/^[0-9a-fA-F]{6}$/', $hex)) { return false; } else { return true; } } /* ----------------------------------------------------------------------------------- */ /* Generates The Options Within the Panel - optionsframework_machine */ /* ----------------------------------------------------------------------------------- */ function salejunction_optionsframework_machine($options) { $counter = 0; $menu = ''; $output = ''; foreach ($options as $value) { $counter++; $val = ''; //Start Heading if ($value['type'] != "heading") { $class = ''; if (isset($value['class'])) { $class = $value['class']; } //$output .= '
'."\n".'
'."\n"; $output .= '
' . "\n"; $output .= '

' . $value['name'] . '

' . "\n"; $output .= '
' . "\n" . '
' . "\n"; } //End Heading $select_value = ''; switch ($value['type']) { case 'text': $val = $value['std']; $std = salejunction_get_option($value['id']); if ($std != "") { $val = $std; } $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 = salejunction_get_option($value['id']); if ($std != "") { $ta_value = stripslashes($std); } $output .= ''; break; case "radio": $select_value = salejunction_get_option($value['id']); foreach ($value['options'] as $key => $option) { $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 .= salejunction_optionsframework_uploader_function($value['id'], $value['std'], null); } break; case "upload_min": $output .= salejunction_optionsframework_uploader_function($value['id'], $value['std'], 'min'); break; case "color": $val = $value['std']; $stored = salejunction_get_option($value['id']); if ($stored != "") { $val = $stored; } $output .= '
'; $output .= ''; break; case "typography": $default = $value['std']; $typography_stored = salejunction_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 = salejunction_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 .= '' . $option . ''; } 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-" . esc_attr($jquery_click_hook); $menu .= '
  • ' . esc_html($value['name']) . '
  • '; $output .= '

    ' . esc_html($value['name']) . '

    ' . "\n"; break; } // if TYPE is an array, formatted into smaller inputs... ie smaller values if (is_array($value['type'])) { foreach ($value['type'] as $array) { $id = $array['id']; $std = $array['std']; $saved_std = salejunction_get_option($id); if ($saved_std != $std) { $std = $saved_std; } $meta = $array['meta']; if ($array['type'] == 'text') { // Only text at this point $output .= ''; $output .= '' . $meta . ''; } } } if ($value['type'] != "heading") { if ($value['type'] != "checkbox") { $output .= '
    '; } if (!isset($value['desc'])) { $explain_value = ''; } else { $explain_value = $value['desc']; } $output .= '
    ' . esc_html($explain_value) . '
    ' . "\n"; $output .= '
    ' . "\n"; } } $output .= '
    '; return array($output, $menu); } /* ----------------------------------------------------------------------------------- */ /* OptionsFramework Uploader - salejunction_optionsframework_uploader_function */ /* ----------------------------------------------------------------------------------- */ function salejunction_optionsframework_uploader_function($id, $std, $mod) { //$uploader .= ''; //$uploader .= ''; $uploader = ''; $upload = salejunction_get_option($id); if ($mod != 'min') { $val = $std; if (salejunction_get_option($id) != "") { $val = salejunction_get_option($id); } $uploader .= ''; } $uploader .= '
    Upload Image'; if (!empty($upload)) { $hide = ''; } else { $hide = 'hide'; } $uploader .= 'Remove'; $uploader .='
    ' . "\n"; $uploader .= '
    ' . "\n"; $findme = 'wp-content/uploads'; $imgvideocheck = strpos($upload, $findme); if ((!empty($upload)) && ($imgvideocheck === true)) { $uploader .= ''; $uploader .= ''; $uploader .= ''; } $uploader .= '
    ' . "\n"; return $uploader; } ?>