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 = '
Save Settings Completed
' . ''; } else { // Display options because no post back $this->displayerrors = intval(get_option('tokenmanager_displayerrors', 0)); $this->displaykeys = intval(get_option('tokenmanager_displaykeys', 0)); $this->injecturl = intval(get_option('tokenmanager_injecturl', 0)); $this->replacep = intval(get_option('tokenmanager_replacep', 0)); $this->smartquotes = intval(get_option('tokenmanager_smartquotes', 0)); } } } // Build class $settings = new settings(); $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); ?>
Token Manager - Settings

Below are the main settings for controlling the Token Manager Wordpress plugin. If you need more information about what a setting does, mouseover on the help icon next to the title.

errormessage; ?>
injecturl==1)?' checked="checked" ':''; ?> value="1" name="injecturl" /> Yes injecturl==0)?' checked="checked" ':''; ?> value="0" name="injecturl" /> No
displayerrors==1)?' checked="checked" ':''; ?> value="1" name="displayerrors" /> Yes displayerrors==0)?' checked="checked" ':''; ?> value="0" name="displayerrors" /> No
displaykeys==1)? ' checked="checked" ' : ''; ?> value="1" name="displaykeys" /> Yes displaykeys==0)? ' checked="checked" ' : ''; ?> value="0" name="displaykeys" /> No
replacep==1)?' checked="checked" ':''; ?> value="1" name="replacep" /> Yes replacep==0)?' checked="checked" ':''; ?> value="0" name="replacep" /> No
smartquotes==1)?' checked="checked" ':''; ?> value="1" name="smartquotes" /> Yes smartquotes==0)?' checked="checked" ':''; ?> value="0" name="smartquotes" /> No