芝麻web文件管理V1.00
编辑当前文件:/home/prismawe/clients/astro-shopping/wp-content/plugins/bkpent8bbooocc008skscccws0wows8/nl.php
' . __('Settings') . '' ], $links); } /** * @throws Exception */ public function onActivation() { $migrator = new Migrator(); $migrator->migrateIfNeeded(); $securityManager = new SecurityManager(); $securityManager->generateApiTokenIfNeeded(); add_option('nl_plugin_activated', true); } /** * @throws Exception */ public function postActivation() { if (is_admin() && get_option('nl_plugin_activated')) { delete_option('nl_plugin_activated'); $fileManager = new FileManager(); $newPluginBasename = $fileManager->generatePluginDirectoryNameIfNeeded(NL_PLUGIN_NAME, basename(plugin_basename(__FILE__))); if (!empty($newPluginBasename)) { add_action('plugin_action_links_' . $newPluginBasename, [self::$_instance, 'settingsPageLink']); } } } /** * @param $upgraderObject * @param array $options * * @throws Exception */ public function onUpdate($upgraderObject, array $options) { // The path to our plugin's main file $currentPlugin = plugin_basename(__FILE__); // If an update has taken place and the updated type is plugins and the plugins element exists if ($options['action'] === 'update' && $options['type'] === 'plugin' && isset($options['plugins'])) { // Iterate through the plugins being updated and check if ours is there foreach ($options['plugins'] as $plugin) { if ($plugin === $currentPlugin) { $migrator = new Migrator(); $migrator->migrateIfNeeded(); } } } } } NextLevel::instance(__FILE__); endif;