本文整理匯總了PHP中DUP_Settings::Data方法的典型用法代碼示例。如果您正苦於以下問題:PHP DUP_Settings::Data方法的具體用法?PHP DUP_Settings::Data怎麽用?PHP DUP_Settings::Data使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DUP_Settings
的用法示例。
在下文中一共展示了DUP_Settings::Data方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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 static function SetDefaults()
{
$default = array();
$default['version'] = self::$Version;
//Flag used to remove the wp_options value duplicator_settings which are all the settings in this class
$default['uninstall_settings'] = isset(self::$Data['uninstall_settings']) ? self::$Data['uninstall_settings'] : true;
//Flag used to remove entire wp-snapshot directory
$default['uninstall_files'] = isset(self::$Data['uninstall_files']) ? self::$Data['uninstall_files'] : true;
//Flag used to remove all tables
$default['uninstall_tables'] = isset(self::$Data['uninstall_tables']) ? self::$Data['uninstall_tables'] : true;
//Flag used to show debug info
$default['package_debug'] = isset(self::$Data['package_debug']) ? self::$Data['package_debug'] : false;
//Flag used to enable mysqldump
$default['package_mysqldump'] = isset(self::$Data['package_mysqldump']) ? self::$Data['package_mysqldump'] : false;
//Optional mysqldump search path
$default['package_mysqldump_path'] = isset(self::$Data['package_mysqldump_path']) ? self::$Data['package_mysqldump_path'] : '';
//Optional mysqldump search path
$default['package_zip_flush'] = isset(self::$Data['package_zip_flush']) ? self::$Data['package_zip_flush'] : false;
self::$Data = $default;
return self::Save();
}
示例2: 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 static function SetDefaults()
{
$defaults = self::GetAllDefaults();
self::$Data = $defaults;
return self::Save();
}