Atualizar src/Plugin.php
This commit is contained in:
parent
a7fb529c92
commit
eb56df4c65
|
|
@ -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();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue