init(); } // Initializes the page. function init() { global $_POST, $wpdb, $_SERVER, $current_site, $blog_id; $haserror = false; // Create custom vars $siteid = (isset($current_site) && isset($current_site->id)) ? $current_site->id : '0'; $blogid = $blog_id; // Process Form if(isset($_POST['savesettings'])) { $this->displayerrors = (isset($_POST['displayerrors']) && !empty($_POST['displayerrors']) && $_POST['displayerrors']=='1') ? intval($_POST['displayerrors']) : 0; $this->displaykeys = (isset($_POST['displaykeys']) && !empty($_POST['displaykeys']) && $_POST['displaykeys']=='1') ? intval($_POST['displaykeys']) : 0; $this->injecturl = (isset($_POST['injecturl']) && !empty($_POST['injecturl']) && $_POST['injecturl']=='1') ? intval($_POST['injecturl']) : 0; $this->replacep = (isset($_POST['replacep']) && !empty($_POST['replacep']) && $_POST['replacep']=='1') ? intval($_POST['replacep']) : 0; $this->smartquotes = (isset($_POST['smartquotes']) && !empty($_POST['smartquotes']) && $_POST['smartquotes']=='1') ? intval($_POST['smartquotes']) : 0; // Update the options update_option('tokenmanager_displayerrors', $this->displayerrors); update_option('tokenmanager_displaykeys', $this->displaykeys); update_option('tokenmanager_injecturl', $this->injecturl); update_option('tokenmanager_replacep', $this->replacep); update_option('tokenmanager_smartquotes', $this->smartquotes); $this->errormessage = '