", $main_content); update_option('ALO_em_template', $main_content); } if(isset($_POST['sender_email'])) update_option('ALO_em_sender_email', trim($_POST['sender_email'])); if(isset($_POST['lastposts']) && (int)$_POST['lastposts'] > 0) update_option('ALO_em_lastposts', trim($_POST['lastposts'])); if(isset($_POST['dayrate']) && (int)$_POST['dayrate'] >= 300 && (int)$_POST['dayrate'] <= 10000 ) update_option('ALO_em_dayrate', trim($_POST['dayrate'])); if(isset($_POST['batchrate']) && (int)$_POST['batchrate'] >= 10 && (int)$_POST['batchrate'] <= 300 ) update_option('ALO_em_batchrate', trim($_POST['batchrate'])); if(isset($_POST['subsc_page']) && (int)$_POST['subsc_page'] ) update_option('ALO_em_subsc_page', trim($_POST['subsc_page'])); if ( isset($_POST['show_subscripage']) ) { update_option('ALO_em_show_subscripage', "yes"); } else { update_option('ALO_em_show_subscripage', "no") ; } if ( isset($_POST['embed_css']) ) { update_option('ALO_em_embed_css', "yes"); } else { update_option('ALO_em_embed_css', "no") ; } if ( isset($_POST['delete_on_uninstall']) && isset($_POST['delete_on_uninstall_2']) ) { update_option('ALO_em_delete_on_uninstall', "yes"); } else { update_option('ALO_em_delete_on_uninstall', "no") ; } // get roles to update cap $role_author = get_role( 'author' ); $role_editor = get_role( 'editor' ); if ( isset($_POST['can_manage_newsletters']) ) { switch ( $_POST['can_manage_newsletters'] ) { case "editor": $role_editor->add_cap( 'manage_easymail_newsletters' ); $role_editor->add_cap( 'send_easymail_newsletters' ); break; case "administrator": default: $role_editor->remove_cap( 'manage_easymail_newsletters' ); } } if ( isset($_POST['can_send_newsletters']) ) { switch ( $_POST['can_send_newsletters'] ) { case "author": $role_author->add_cap( 'send_easymail_newsletters' ); $role_editor->add_cap( 'send_easymail_newsletters' ); break; case "editor": $role_editor->add_cap( 'send_easymail_newsletters' ); $role_author->remove_cap( 'send_easymail_newsletters' ); break; case "administrator": default: $role_author->remove_cap( 'send_easymail_newsletters' ); $role_editor->remove_cap( 'send_easymail_newsletters' ); $role_editor->remove_cap( 'manage_easymail_newsletters' ); } } if ( isset($_POST['can_manage_subscribers']) ) { switch ( $_POST['can_manage_subscribers'] ) { case "editor": $role_editor->add_cap( 'manage_easymail_subscribers' ); break; case "administrator": default: $role_editor->remove_cap( 'manage_easymail_subscribers' ); } } if ( isset($_POST['can_manage_options']) ) { switch ( $_POST['can_manage_options'] ) { case "editor": $role_editor->add_cap( 'manage_easymail_options' ); break; case "administrator": default: $role_editor->remove_cap( 'manage_easymail_options' ); } } //echo "
";print_r($wp_roles);echo ""; } // -------- echo '
'. __("Updated", "alo-easymail") .'
'. __("Error during operation.", "alo-easymail") .'
'. __("Updated", "alo-easymail") .'
'. __("Error during operation.", "alo-easymail") .'
'. __("Inputs are incompled or wrong. Please check and try again.", "alo-easymail") .'
'. __("Updated", "alo-easymail") .'
'. __("Error during operation.", "alo-easymail") .'
'. __("Error during operation.", "alo-easymail") .'
: : : ";
echo " ";
echo " ";
echo "";
echo " ";
?>
|
||||