'0', 'code' => '0', 'codepass' => array('0'), 'captcha' => '0', 'disclaimer' => '0', 'disclaimer_content' => '', 'email_exists' => '0', 'firstname' => '0', 'lastname' => '0', 'website' => '0', 'aim' => '0', 'yahoo' => '0', 'jabber' => '0', 'about' => '0', 'profile_req' => array('0'), 'dash_widget' => '0', 'email_verify' => '0', 'email_delete_grace' => '7' ); # Get Previously Saved Items and put into new Settings if( get_option("regplus_password") ) $default['password'] = get_option("regplus_password"); if( get_option("regplus_code") ) $default['code'] = get_option("regplus_code"); if( get_option("regplus_codepass") ) $default['codepass'] = get_option("regplus_codepass"); if( get_option("regplus_captcha") ) $default['captcha'] = get_option("regplus_captcha"); #Delete Previous Saved Items delete_option('regplus_password'); delete_option('regplus_code'); delete_option('regplus_codepass'); delete_option('regplus_captcha'); #Set Default Settings if( !get_option('register_plus') ){ #Set Defaults if no values exist add_option( 'register_plus', $default ); }else{ #Set Defaults if new value does not exist $regplus = get_option( 'register_plus' ); foreach( $default as $key => $val ){ if( !$regplus[$key] ){ $regplus[$key] = $val; $new = true; } } if( $new ) update_option( 'register_plus', $regplus ); } } function SaveSettings(){ check_admin_referer('regplus-update-options'); $update = get_option( 'register_plus' ); $update["password"] = $_POST['regplus_password']; $update["code"] = $_POST['regplus_code']; if( $_POST['regplus_code'] ) $update["codepass"] = $_POST['regplus_codepass']; $update["captcha"] = $_POST['regplus_captcha']; $update["disclaimer"] = $_POST['regplus_disclaimer']; $update["disclaimer_content"] = $_POST['regplus_disclaimer_content']; $update["email_exists"] = $_POST['regplus_email_exists']; $update["firstname"] = $_POST['regplus_firstname']; $update["lastname"] = $_POST['regplus_lastname']; $update["website"] = $_POST['regplus_website']; $update["aim"] = $_POST['regplus_aim']; $update["yahoo"] = $_POST['regplus_yahoo']; $update["jabber"] = $_POST['regplus_jabber']; $update["about"] = $_POST['regplus_about']; $update["profile_req"] = $_POST['regplus_profile_req']; $update["dash_widget"] = $_POST['regplus_dash_widget']; $update["email_verify"] = $_POST['regplus_email_verify']; $update["email_verify_date"] = $_POST['regplus_email_verify_date']; $update["email_delete_grace"] = $_POST['regplus_email_delete_grace']; if( $_POST['label'] ){ foreach( $_POST['label'] as $k => $field ){ if( $field ) $custom[$k] = array( 'label' => $field, 'profile' => $_POST['profile'][$k], 'reg' => $_POST['reg'][$k], 'required' => $_POST['required'][$k] ); } } update_option( 'register_plus_custom', $custom ); update_option( 'register_plus', $update ); $_POST['notice'] = __('Settings Saved', 'regplus'); } function SettingsHead(){ $regplus = get_option( 'register_plus' ); ?>

' . $_POST['notice'] . '.

'; if( !is_array($regplus['profile_req']) ) $regplus['profile_req'] = array(); if( is_array($regplus['codepass']) ){ foreach( $regplus['codepass'] as $code ){ $codes .= '
  ' . __( ' . __(
'; } } if( is_array($regplus_custom) ){ foreach( $regplus_custom as $k => $v ) { $rows .= '