本文整理汇总了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();
}