Atualizar src/Plugin.php

This commit is contained in:
Brasdrive 2025-11-05 09:18:26 -04:00
parent a7fb529c92
commit eb56df4c65
1 changed files with 238 additions and 238 deletions

View File

@ -94,8 +94,8 @@ class Plugin
add_action( add_action(
'update_option_flysystem_offload_settings', 'update_option_flysystem_offload_settings',
function ($oldValue, $newValue) { function ($oldValue, $newValue) {
$this->settings = $newValue; $this->settings = $newValue;
$this->filesystem = null; $this->filesystem = null;
$this->streamRegistered = false; $this->streamRegistered = false;
$this->registerStreamWrapper(); $this->registerStreamWrapper();
}, },
@ -113,9 +113,9 @@ class Plugin
add_action('delete_attachment', [$this, 'handleDeleteAttachment'], 20); add_action('delete_attachment', [$this, 'handleDeleteAttachment'], 20);
add_action('switch_blog', function () { add_action('switch_blog', function () {
$this->filesystem = null; $this->filesystem = null;
$this->streamRegistered = false; $this->streamRegistered = false;
$this->settings = get_option('flysystem_offload_settings', []); $this->settings = get_option('flysystem_offload_settings', []);
$this->registerStreamWrapper(); $this->registerStreamWrapper();
}); });