function lookilite_save_option($panel) { global $message_action; $lookilite_setting = get_option(lookilite_themename()); if ($lookilite_setting != false) { $lookilite_setting = maybe_unserialize($lookilite_setting); } else { $lookilite_setting = array(); } if ("Save" == lookilite_request('action')) { foreach ($panel as $element) { if (isset($element['tab']) && $element['tab'] == $_GET['tab']) { foreach ($element as $value) { if ($_REQUEST['element-opened'] == "Skins") { require_once dirname(__FILE__) . '/option/skins.php'; update_option(lookilite_themename(), array_merge($lookilite_setting, $current)); break; } else { if (isset($value['id']) && isset($_POST[$value["id"]])) { $current[$value["id"]] = $_POST[$value["id"]]; update_option(lookilite_themename(), array_merge($lookilite_setting, $current)); } } $message_action = 'Options saved successfully.'; } } } } }
function lookilite_setting($id) { $lookilite_setting = get_option(lookilite_themename()); if (isset($lookilite_setting[$id])) { return $lookilite_setting[$id]; } }