PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/seoshop.live/wp-content/plugins/duplicator/classes/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/seoshop.live/wp-content/plugins/duplicator/classes/class.settings.php

<?php
if ( ! class_exists( 'DuplicatorSettings' ) ) {
	class DuplicatorSettings
	{
		public $Data;
		public $Version = DUPLICATOR_VERSION;
		public $OptionName = 'duplicator_settings';

		/**
		*  DUPLICATOR-SETTINGS
		*  Class used to manage all the settings for the plugin
		*/
		function __construct() {
			$this->Data = get_option($this->OptionName);
			
			//when the plugin updated, this will be true
			if (empty($this->Data) || $this->Version > $this->Data['version']){
				$this->SetDefaults();
			}
		}
		
		/**
		*  GET: Find the setting value
		*  @param string $key	The name of the key to find
		*  @return The value stored in the key returns null if key does not exist
		*/
		function Get($key = '') {
			return isset($this->Data[$key]) ? $this->Data[$key] : null;
		}
		
		/**
		*  SET: Set the settings value in memory only
		*  @param string $key		The name of the key to find
		*  @param string $value		The value to set
		*  remarks:	 The Save() method must be called to write the Settings object to the DB
		*/
		function Set($key = '', $value) {
			if (isset($this->Data[$key]) && $value != null) {
				$this->Data[$key] = $value;
			}
		}

		/**
		*  SAVE: Save all the setting values to the database
		*  @return True if option value has changed, false if not or if update failed.
		*/
		public function Save() {
			return update_option($this->OptionName, $this->Data);
		}
		
		/**
		*  DELETE: Delete all the setting values to the database
		*  @return True if option value has changed, false if not or if update failed.
		*/
		public function Delete() {
			return delete_option($this->OptionName);
		}
		
		/**
		*  SETDEFAULTS
		*  Sets the defaults if they have not been set
		*  @return True if option value has changed, false if not or if update failed.
		*/
		public function SetDefaults() {
			$default['version'] = $this->Version;
			$default['uninstall_files']  = isset($this->Data['uninstall_files'])  ? $this->Data['uninstall_files']  : true;
			$default['uninstall_tables'] = isset($this->Data['uninstall_tables']) ? $this->Data['uninstall_tables'] : true;

			$this->Data = $default;
			return $this->Save();
			
		}
		
	}
}
?>