| Current Path : /home/jeromecohp/www/tmp/yooessentials/modules/core/ |
| Current File : /home/jeromecohp/www/tmp/yooessentials/modules/core/updates.php |
<?php
/**
* @package Essentials YOOtheme Pro (Freemium) 1.6.8
* @author ZOOlanders https://www.zoolanders.com
* @copyright Copyright (C) Joolanders, SL
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/
namespace ZOOlanders\YOOessentials;
use function YOOtheme\app;
use YOOtheme\Arr;
use YOOtheme\Config as Yooconfig;
return [
'config' => [
// migrate config from yooconfig
'1.6.0-beta' => function ($config) {
/** @var Yooconfig $yooconfig */
$yooconfig = app(Yooconfig::class);
foreach (['access', 'auth', 'element', 'form', 'icon', 'source'] as $path) {
if ($val = $yooconfig->get("~theme.yooessentials.{$path}")) {
if (!Arr::has($config, $path)) {
Arr::set($config, $path, $val);
}
$yooconfig->del("~theme.yooessentials.{$path}");
}
}
$yooconfig->del('~theme.yooessentials');
// give a hint to customizer there was an update
Arr::set($config, 'updated', true);
return $config;
}
]
];