"000000", "Affiliate_ID" => "ABU-1338563844", "Thank_you_page" => "http://abundatrade.com/trade/thank-you.php?a=abundatrade", "Theme" => "classic" )); if (get_option("skel_abundatrade_options", false) === false) { $options = array(); } else { $options = get_option("skel_abundatrade_options"); } $options = array_merge($default, $options); return $options; } public function applySettings($var) { foreach($var as $setting => $value) { if (isset($this->$setting)) $this->$setting = $value; } } /** * Reduces the class's settings to an array and returns them * @var mixed $settings Other settings to merge these with (for addons) * @return mixed The settings array */ function getSettings($settings) { $this->reduceSettings(); return array_merge($settings, $this->settings_array); } /** * Run update code here * @var string $version The version that was installed previously * @var string $coded_version The version that is currently running (or to update to) */ function update($version, $coded_version) { switch ($version) { case "0.0": // a fresh install break; case "0.1": // from the very first version break; case "0.2": // from this version ... slightly confused break; case "0.6": // from before the theme default: // from an unknown version ... break; } if ($coded_version >= 010601) { $dir = wp_upload_dir(); mkdir($dir['basedir'] . '/abundatrade/themes/', 0770, true); } } /** * Gets the plugin settings * @return skel__settings This plugin's settings class */ public static function Settings() { $settings = apply_filters("abundatrade(settings)", array()); return $settings[0]; } public static function RenderBox($title, $description = '', $inputs = null) { ?>