more improves in optin gestion in class, automatic handling for basic cases
This commit is contained in:
@@ -33,13 +33,53 @@ add_action('admin_menu', __NAMESPACE__.'\add_plugin_menu');
|
||||
*
|
||||
*/
|
||||
function menu_content() {
|
||||
echo '<p>hello</p>';
|
||||
$option_register_email = Xtxpatch::OPTION_REGISTER_EMAIL;
|
||||
|
||||
$option_register_email_name = $option_register_email['_name'];
|
||||
$option_register_email_value = \Plgntls_xtx::get_option_safe($option_register_email);
|
||||
|
||||
ob_start();
|
||||
include(\Plgntls_xtx::root_path() . 'html/admin_menu.html');
|
||||
echo ob_get_clean();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function define_register_email($request, $option_name, $option_value) {
|
||||
/*
|
||||
* email
|
||||
*
|
||||
*/
|
||||
$email = '';
|
||||
if (isset($request['email'])) {
|
||||
$option_value['email'] = $request['email'];
|
||||
}
|
||||
|
||||
/*
|
||||
* is email ?
|
||||
*
|
||||
$is_email_prof = false;
|
||||
if (isset($post['is_email_prof']) && $post['is_email_prof'] === 'on') {
|
||||
$is_email_prof = true;
|
||||
}
|
||||
$is_email_partner = false;
|
||||
if (isset($post['is_email_partner']) && $post['is_email_partner'] === 'on') {
|
||||
$is_email_partner = true;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* update the option with new values
|
||||
*
|
||||
*/
|
||||
// Plgntls_xtx::update_option_safe($option_name, $email);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user