Properties

$security_nonces

$security_nonces : string

Protected static variable to hold security nounces.

Type

string — Security nonce.

$security_names

$security_names : string

Protected static variable to hold security nounces.

Type

string — Security nonce.

$instance

$instance : 

Instance class.

Type

— Singleton MainWP_Post_Backup_Handler.

Methods

init()

init() : void

Init backups actions

Force Extending class to define this method.

secure_request()

secure_request(string  $action = '', string  $query_arg = 'security') 

Method secure_request()

Add security check to request parameter

Parameters

string $action

Action to perform.

string $query_arg

Query argument.

check_security()

check_security(string  $action = -1, string  $query_arg = 'security', boolean  $out_die = true) : boolean

Method check_security()

Check security request.

Parameters

string $action

Action to perform.

string $query_arg

Query argument.

boolean $out_die

return or exit.

Returns

boolean —

true or false

add_action()

add_action(string  $action, string  $callback, integer  $priority = 10, integer  $accepted = 2) 

Method add_action()

Add ajax action.

Parameters

string $action

Action to perform.

string $callback

Callback to perform.

integer $priority

priority aciton.

integer $accepted

number args.

add_action_nonce()

add_action_nonce(string  $action) 

Method add_action_nonce()

Add security nonce.

Parameters

string $action

Action to perform.

create_security_nonces()

create_security_nonces() : self

Create the security nonces.

Returns

self —

$security_nonces.

instance()

instance() : self

Create public static instance.

Returns

self —

$instance MainWP_Post_Backup_Handler.

mainwp_backup_run_site()

mainwp_backup_run_site() 

Method mainwp_backup_run_site()

Run backup task of site

Throws

\MainWP\Dashboard\MainWP_Exception

On errors.

mainwp_backup()

mainwp_backup() 

Method mainwp_backup()

Run backup task

Throws

\MainWP\Dashboard\MainWP_Exception

On errors.

mainwp_backup_checkpid()

mainwp_backup_checkpid() 

Method mainwp_backup_checkpid()

Check backup task

Throws

\MainWP\Dashboard\MainWP_Exception

On errors.

mainwp_backup_download_file()

mainwp_backup_download_file() 

Method mainwp_backup_download_file()

Download backup file

Throws

\MainWP\Dashboard\MainWP_Exception

On errors.

mainwp_backup_delete_file()

mainwp_backup_delete_file() 

Method mainwp_backup_delete_file()

Delete backup file

Throws

\MainWP\Dashboard\MainWP_Exception

On errors.

mainwp_createbackup_getfilesize()

mainwp_createbackup_getfilesize() 

Method mainwp_createbackup_getfilesize()

Get create backup file size.

Throws

\Exception

On errors.

mainwp_backup_getfilesize()

mainwp_backup_getfilesize() 

Method mainwp_backup_getfilesize()

Get backup file size

mainwp_backup_upload_checkstatus()

mainwp_backup_upload_checkstatus() 

Method mainwp_backup_upload_checkstatus()

Check upload status

Throws

\MainWP\Dashboard\MainWP_Exception

On errors.

mainwp_backup_upload_getprogress()

mainwp_backup_upload_getprogress() 

Method mainwp_backup_upload_getprogress()

Get progress status.

Throws

\MainWP\Dashboard\MainWP_Exception

On finished or errors.

mainwp_addbackup()

mainwp_addbackup() 

Method mainwp_addbackup()

Add task to the database.

mainwp_updatebackup()

mainwp_updatebackup() 

Method mainwp_updatebackup()

Update task.

mainwp_removebackup()

mainwp_removebackup() 

Method mainwp_removebackup()

Remove a task from MainWP.

mainwp_resumebackup()

mainwp_resumebackup() 

Method mainwp_resumebackup()

Resume backup task.

mainwp_pausebackup()

mainwp_pausebackup() 

Method mainwp_pausebackup()

Pause backup task.

mainwp_backuptask_get_sites()

mainwp_backuptask_get_sites() 

Method mainwp_backuptask_get_sites()

Get sites of backup task.

mainwp_backuptask_run_site()

mainwp_backuptask_run_site() 

Method mainwp_backuptask_run_site()

Run backup task of site.

Throws

\MainWP\Dashboard\MainWP_Exception

On errors.

mainwp_checkbackups()

mainwp_checkbackups() 

Method mainwp_checkbackups()

Check backup status.

Throws

\Exception

On errors.