$instance
$instance : mixed
Public static variable to hold the single instance of MainWP_Child_Updraft_Plus_Backups.
Class MainWP_Child_Updraft_Plus_Backups
instance() : \MainWP\Child\MainWP_Child_Updraft_Plus_Backups|null
Create a public static instance of MainWP_Child_Updraft_Plus_Backups.
sync_others_data(array $information, array $data = array()) : array
Sync other data from $data[] and merge with $information[]
array | $information | Returned response array for MainWP BackWPup Extension actions. |
array | $data | Other data to sync to $information array. |
$information Returned information array with both sets of data.
addons2_get_option(string $option) : mixed
Get site option (2)
Funnelling through here, a) allows for future flexibility and, b) allows us to migrate elegantly from the previous non-MU-friendly setup.
string | $option | Site option to get. |
$val Returned site option.
prune_updraft_dir_prefix( $updraft_dir) : false|string
Prune Updraft directory prefix
This options filter removes ABSPATH off the front of $updraft_dir, if it is given absolutely and contained within it.
$updraft_dir | Directory to prune. |
Return Pruned $updraft_dir or FALSE on failure.
analyse_db_file(string $timestamp, string $res, boolean $db_file = false, boolean $header_only = false) : array<mixed,array>
Analyse database file.
string | $timestamp | File timestamp. |
string | $res | UpdraftPlus response. |
boolean | $db_file | Whether or not a DB file was found. Default: false. |
boolean | $header_only | Whether or not file only has headers. Default: false. |
Return array( $mess, $warn, $err, $info ).
remove_filters_for_anonymous_class(string $hook_name = '', string $class_name = '', string $method_name = '', integer $priority) : boolean
Allows removal of method for a hook when the class doesn't have a variable but you know the class name.
string | $hook_name | Hook name. |
string | $class_name | Class name. |
string | $method_name | Method name. |
integer | $priority | Priority. |
Return FALSE on failure.
vault_connect(string $email, \MainWP\Child\strign $password) : boolean|\MainWP\Child\WP_Error
Connect to UpdraftPlus Vault.
string | Vault account user name. |
|
\MainWP\Child\strign | $password | Vault account password. |
$return Returns either true (in which case the Vault token will be stored), or false|\WP_Error.
delete_old_dirs_dir(string $dir, boolean $wpfs = true) : boolean|string
Delete the directories within a directory.
string | $dir | Directory to scan. |
boolean | $wpfs | Whether or not to use Wordpress filesystem to list directories, Default: true. |
$ret Return FALSE & echo 'Failed' on failure or echo 'OK' on success.
analyse_db_file_old(string $timestamp, string $res, boolean $db_file = false, boolean $header_only = false) : array<mixed,array>
Analyse old database file.
string | $timestamp | File timestamp. |
string | $res | UpdraftPlus response. |
boolean | $db_file | Whether or not a DB file was found. Default: false. |
boolean | $header_only | Whether or not file only has headers. Default: false. |
Return array( $mess, $warn, $err, $info ).
existing_backup_table(boolean $backup_history = false) : string
Build existing backups table.
boolean | $backup_history | Whether or not there is existing backups. Default: false. |
Error message.
Return $ret backups table html.
date_label(string $pretty_date, string $key, string $backup, array $jobdata, string $nonce) : string
Date label.
string | $pretty_date | Pretty date. |
string | $key | Timestamp. |
string | $backup | Type of backup. |
array | $jobdata | Job data. |
string | $nonce | Security nonce. |
$ret Return date label html.
download_db_button(string $bkey, string $key, string $esc_pretty_date, string $nonce_field, array $backup, array $accept = array()) : string
Download database button.
string | $bkey | Backup key. |
string | $key | Timestamp. |
string | $esc_pretty_date | Escaped pretty date. |
string | $nonce_field | Nonce filed. |
array | $backup | Backup data |
array | $accept | Destination array. |
$ret Download DB button html.
download_buttons(array $backup, string $key, array $accept, array $entities, string $esc_pretty_date, string $nonce_field) : string
Download buttons.
array | $backup | Backup data array. |
string | $key | Backup key. |
array | $accept | Destination array. |
array | $entities | File entities. |
string | $esc_pretty_date | Escaped pretty date. |
string | $nonce_field | Nonce field. |
$ret Download button html.
download_button(string $type, string $key, string $findex, string $info, string $nonce_field, string $ide, string $pdescrip, string $esc_pretty_date, string $set_contents) : string
Single download button.
string | $type | Backup type. |
string | $key | Backup key. |
string | $findex | File index. |
string | $info | Backup info. |
string | $nonce_field | Security nonce field. |
string | $ide | Submit title. |
string | $pdescrip | Description. |
string | $esc_pretty_date | Escaped pretty date. |
string | $set_contents | mainwp_updraft_downloader value. |
Download button html.
recursive_directory_size(array $directorieses, array $exclude = array(), string $basedirs = '') : string
Recursively get directory sizes.
If $basedirs is passed as an array, then $directorieses must be too.
array | $directorieses | Directories to size. |
array | $exclude | Directories to exclude. |
string | $basedirs | Base directories. |
Return total size.
recursive_directory_size_raw(string $prefix_directory, array $exclude = array(), string $suffix_directory = '') : false|integer
Recursivly get raw directory sizes.
string | $prefix_directory | Directory prefix. |
array | $exclude | Directories to exclude. |
string | $suffix_directory | Directory suffix. |
Return $size Raw Directory size or FALSE on failure.
print_active_jobs(boolean $this_job_only = false) : string
Display active jobs.
A value for $this_job_only also causes something to always be returned (to allow detection of the job having started on the front-end).
boolean | $this_job_only |
$ret Return active jobs html.
print_active_job(string $job_id, boolean $is_oneshot = false, boolean $time = false, boolean $next_resumption = false) : string
Display active job.
string | $job_id | Job ID. |
boolean | $is_oneshot | Whether or not this is a one time backup. |
boolean | $time | Backup time. |
boolean | $next_resumption | Next backups resumption. |
Active job html.