xtxpatch saves the email settings, still need to handle them
This commit is contained in:
@@ -46,6 +46,42 @@ function menu_content() {
|
||||
|
||||
|
||||
|
||||
function define_register_email($request, $option_name, $option_value, $option_default) {
|
||||
/*
|
||||
* email
|
||||
*
|
||||
*/
|
||||
$email = '';
|
||||
if (isset($request['email'])) {
|
||||
$email = $request['email'];
|
||||
}
|
||||
|
||||
/*
|
||||
* is email ?
|
||||
*
|
||||
*/
|
||||
$is_email_prof = false;
|
||||
if (isset($request['is_email_prof']) && $request['is_email_prof'] === 'on') {
|
||||
$is_email_prof = true;
|
||||
}
|
||||
$is_email_partner = false;
|
||||
if (isset($request['is_email_partner']) && $request['is_email_partner'] === 'on') {
|
||||
$is_email_partner = true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* update the option with new values
|
||||
*
|
||||
*/
|
||||
$option_data = array(
|
||||
'email' => $email,
|
||||
'is_email_prof' => $is_email_prof,
|
||||
'is_email_partner' => $is_email_partner,
|
||||
);
|
||||
\Plgntls_xtx::update_option_safe($option_name, $option_data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user