/** * Activation hook * * @return void */ function activate() { //If we have no stored settings for this version of the plugin, try importing them //from other versions (i.e. the free or the Pro version). if (!$this->load_options()) { $this->import_settings(); } parent::activate(); }
/** * Activation hook * * @return void */ function activate() { //If we have no stored settings for this version of the plugin, try importing them //from other versions (i.e. the free or the Pro version). if (!$this->load_options()) { $this->import_settings(); } //Track first install time. Could be useful for, for example, selectively displaying //a "What's New" message only to users who upgraded from an older version. $show_hints = $this->get_hint_visibility(); $hint_id = 'ws_whats_new_120'; if (!isset($show_hints[$hint_id])) { $show_hints[$hint_id] = empty($this->options['first_install_time']) && !empty($this->options['custom_menu']); $this->set_hint_visibility($show_hints); } if (empty($this->options['first_install_time'])) { $this->options['first_install_time'] = time(); } parent::activate(); }