mirror of
https://github.com/getgrav/grav.git
synced 2026-07-05 20:49:33 +02:00
Make plugins and themes load the merged config from all files
This commit is contained in:
@@ -123,10 +123,10 @@ class Plugins extends Iterator
|
||||
$obj = new Data($file->content(), $blueprint);
|
||||
|
||||
// Override with user configuration.
|
||||
$file = CompiledYamlFile::instance("user://config/plugins/{$name}.yaml");
|
||||
$obj->merge($file->content());
|
||||
$obj->merge($this->grav['config']->get('plugins.' . $name) ?: []);
|
||||
|
||||
// Save configuration always to user/config.
|
||||
$file = CompiledYamlFile::instance("config://plugins/{$name}.yaml");
|
||||
$obj->file($file);
|
||||
|
||||
return $obj;
|
||||
|
||||
@@ -106,10 +106,10 @@ class Themes extends Iterator
|
||||
$obj = new Data($file->content(), $blueprint);
|
||||
|
||||
// Override with user configuration.
|
||||
$file = CompiledYamlFile::instance("user://config/themes/{$name}" . YAML_EXT);
|
||||
$obj->merge($file->content());
|
||||
$obj->merge($this->grav['config']->get('themes.' . $name) ?: []);
|
||||
|
||||
// Save configuration always to user/config.
|
||||
$file = CompiledYamlFile::instance("config://themes/{$name}" . YAML_EXT);
|
||||
$obj->file($file);
|
||||
|
||||
return $obj;
|
||||
|
||||
Reference in New Issue
Block a user