Your IP : 216.73.216.68


Current Path : /home/jeromecohp/www/plugins/system/yooessentials/modules/core/
Upload File :
Current File : /home/jeromecohp/www/plugins/system/yooessentials/modules/core/updates.php

<?php
/**
 * @package   Essentials YOOtheme Pro (Freemium) 2.0.19 build 1026.0920
 * @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');

            return $config;
        },
    ],
];