global $wp_version, $wpdb, $user_ID, $wp_roles; // Check IMAP extension is installed $imap_installed = function_exists('imap_open') ? true : false; // delete welcome setting alert if (isset($_REQUEST['timeout_alert']) && $_REQUEST['timeout_alert'] == "stop") { update_option('alo_em_timeout_alert', "hide"); } // If updating languages list if (isset($_POST['langs_list']) && current_user_can('manage_options')) { $new_langs = explode(",", stripslashes(trim($_POST['langs_list']))); if (!empty($new_langs[0])) { for ($i = 0; $i < count($new_langs); $i++) { if (strlen(trim($new_langs[$i])) < 2) { unset($new_langs[$i]); } $new_langs[$i] = alo_em_short_langcode(trim($new_langs[$i])); } $str_langs = implode(',', $new_langs); $str_langs = rtrim($str_langs, ","); update_option('alo_em_langs_list', $str_langs); } } // All available languages $languages = alo_em_get_all_languages(false); // Text fields for multilangual customization $text_fields = array("optin_msg", "optout_msg", "lists_msg", "preform_msg", "disclaimer_msg"); // If require to check bounce connection or manually check bounces, first submit form and save options if (isset($_POST['test_bounce_connection']) || isset($_POST['check_bounces_now'])) { $_POST['submit'] = true; } if (isset($_POST['submit'])) {