protected function setup() { parent::setup(); //upgrading Feed Add-On base class $installed_version = get_option("gravityformsaddon_feed-base_version"); //if ($installed_version != $this->_feed_version) //$this->upgrade_base($installed_version); //update_option("gravityformsaddon_feed-base_version", $this->_feed_version); }
protected function setup() { //upgrading Feed Add-On base class $installed_version = get_option('gravityformsaddon_feed-base_version'); if ($installed_version != $this->_feed_version) { $this->upgrade_base($installed_version); } update_option('gravityformsaddon_feed-base_version', $this->_feed_version); parent::setup(); }
/** * Performs upgrade tasks when the version of the Add-On changes. To add additional upgrade tasks, override the upgrade() function, which will only get executed when the plugin version has changed. */ public function setup() { global $wpdb; $table_name = $wpdb->prefix . 'gf_addon_feed'; // upgrading Feed Add-On base class $installed_version = get_option('gravityformsaddon_feed-base_version'); if ($installed_version != $this->_feed_version || isset($_GET['setup']) && $this->is_plugin_settings() && !$this->table_exists($table_name)) { $this->upgrade_base($installed_version); update_option('gravityformsaddon_feed-base_version', $this->_feed_version); } parent::setup(); }
protected function setup() { global $wpdb; $table_name = $wpdb->prefix . 'gf_addon_feed'; //upgrading Feed Add-On base class $installed_version = get_option('gravityformsaddon_feed-base_version'); if ($installed_version != $this->_feed_version || !$this->table_exists($table_name)) { $this->upgrade_base($installed_version); update_option('gravityformsaddon_feed-base_version', $this->_feed_version); } parent::setup(); }