public function on_activation() { if (current_user_can('administrator')) { $data = get_plugin_data(Mvc::$pluginFile); Mvc::$pluginVersion = $data['Version']; Mvc::log($data); $version = Mvc::option('version', ''); if ($version != Mvc::$pluginVersion) { require_once ABSPATH . 'wp-admin/includes/upgrade.php'; $this->controller->on_upgrade($version, Mvc::$pluginVersion); Mvc::option('version', Mvc::$pluginVersion); } $this->controller->on_activation(); } }
public function save() { Mvc::log('saving', $this->key, $this->value); return Mvc::option($this->key, $this->value); }