function install_plugin() { $this->o = get_option('gd-simple-widgets'); if (!is_array($this->o)) { update_option('gd-simple-widgets', $this->default_options); $this->o = get_option('gd-simple-widgets'); } else { if ($this->o["build"] < $this->default_options["build"] || $this->o["edition"] != $this->default_options["edition"]) { $this->o = gdFunctionsGDSW::upgrade_settings($this->o, $this->default_options); $this->o["version"] = $this->default_options["version"]; $this->o["date"] = $this->default_options["date"]; $this->o["status"] = $this->default_options["status"]; $this->o["build"] = $this->default_options["build"]; $this->o["edition"] = $this->default_options["edition"]; $this->o["product_id"] = $this->default_options["product_id"]; update_option('gd-simple-widgets', $this->o); } } $this->cache_active = $this->o["cache_data"] == 1; }