Метод | Описание | |
---|---|---|
calculate_path ( ) | Calculate the backup path and create the directory if it doesn't exist. | |
cleanup ( ) | Clean any temporary / incomplete backups from the backups directory | |
get_custom_path ( ) | Get the path to the custom backup location if it's been set | |
get_default_path ( ) | Get the path to the default backup location in wp-content | |
get_existing_path ( ) : string | Returns the first existing path if there is one | |
get_existing_paths ( ) : array | Builds an array containing existing backups folders. | |
get_fallback_path ( ) | Get the path to the fallback backup location in uploads | |
get_home_path ( string $site_path = ABSPATH ) | Calculate the path to the site "home" directory. | |
get_instance ( ) : |
Returns the *Singleton* instance of this class. | |
get_path ( ) | Convenience method for quickly grabbing the path | |
get_root ( ) | Convenience method for quickly grabbing the root | |
merge_existing_paths ( ) | If we have more than one path then move any existing backups to the current path and remove them | |
move_old_backups ( string $from ) | Move backup files from an existing directory and the new location. | |
protect_path ( string $reset = 'no' ) | Protect the directory that backups are stored in | |
reset_path ( ) | ||
set_path ( $path ) | Set the path directly, overriding the default | |
set_root ( $root ) | Set the root path directly, overriding the default |
Метод | Описание | |
---|---|---|
__construct ( ) | Protected constructor to prevent creating a new instance of the *Singleton* via the new operator from outside of this class. |
Метод | Описание | |
---|---|---|
__clone ( ) | Private clone method to prevent cloning of the instance of the *Singleton* instance. | |
__wakeup ( ) | Private unserialize method to prevent unserializing of the *Singleton* instance. | |
get_calculated_path ( ) | get the calculated path to the directory where backups will be stored | |
get_calculated_root ( ) | get the calculated path to the directory that will be backed up |
protected __construct ( ) |
public calculate_path ( ) |
public cleanup ( ) |
public get_custom_path ( ) |
public get_default_path ( ) |
public get_existing_path ( ) : string | ||
Результат | string | Backup path if found empty string if not |
public get_existing_paths ( ) : array | ||
Результат | array |
public get_fallback_path ( ) |
public static get_home_path ( string $site_path = ABSPATH ) | ||
$site_path | string | The site_path to use when calculating the home path, defaults to ABSPATH |
public static get_instance ( ) : |
||
Результат | The *Singleton* instance. |
public static get_path ( ) |
public static get_root ( ) |
public merge_existing_paths ( ) |
public move_old_backups ( string $from ) | ||
$from | string | The path to move the backups from. |
public protect_path ( string $reset = 'no' ) | ||
$reset | string |
public set_path ( $path ) | ||
$path |
public set_root ( $root ) | ||
$root |