Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /proc/thread-self/cwd/wp-content/plugins/uicore-framework/includes/core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/cwd/wp-content/plugins/uicore-framework/includes/core/settings_helper.php
<?php

namespace UiCore;


defined('ABSPATH') || exit();

/**
 * Brisk Settings Utils
 */
class Settings_Helper
{

    public static function get_all_settings($default,$option_name)
    {
        $settings = get_option($option_name);

        if(!is_array($settings)){
            $settings = [];
        }
        
        return \wp_parse_args($settings, $default);
    }

    public static function update_all_settings($default, $option_name, $settings)
    {

        $db_settings = self::get_all_settings($default,$option_name);

        foreach($default as $key => $value){

            if(isset($settings[$key]) ){
                if(Settings::is_not_default($value, $settings[$key]) ){
                    $db_settings[$key] = $settings[$key];
                }else{
                    unset($db_settings[$key]);
                }
            }elseif( !Settings::is_not_default($value, $db_settings[$key])) {
                unset($db_settings[$key]);
            }
        
		}

        update_option( $option_name, $db_settings);

    }

}

Spamworldpro Mini