/** * Activate. */ public function activate() { Account::install(); Account::ensureNotificationsDirExists(); Transaction::install(); foreach ($this->optionDefaults as $option => $default) { if (!get_option($option)) { update_option($option, $default); } } }
/** * Get pub sub. */ public function getPubSub() { if (!$this->pubSub) { Account::ensureNotificationsDirExists(); $dir = Account::getNotificationsDir(); $fn = $this->entity_type . ":" . $this->entity_id; $this->pubSub = new PubSub($dir . "/" . $fn); } return $this->pubSub; }