Properties

$instance

$instance : mixed

Public static variable to hold the single instance of the class.

Type

mixed — Default null

$is_plugin_installed

$is_plugin_installed : boolean

Public variable to hold the infomration if the BackUpWordPress plugin is installed on the child site.

Type

boolean — If BackUpWordPress intalled, return true, if not, return false.

Methods

instance()

instance() : mixed

Method instance()

Create a public static instance.

Returns

mixed —

Class instance.

__construct()

__construct() 

MainWP_Child_Back_Up_WordPress constructor.

Run any time the class is called.

init()

init() : void

Method init()

Initiate action hooks.

hide_update_notice()

hide_update_notice(array  $slugs) : array

Remove the BackUpWordPress plugin update notice when the plugin is hidden.

Parameters

array $slugs

Array containing installed plugins slugs.

Returns

array —

$slugs Array containing installed plugins slugs.

remove_update_nag()

remove_update_nag(object  $value) : object

Remove the BackUpWordPress plugin update notice when the plugin is hidden.

Parameters

object $value

Object containing update information.

Returns

object —

$value Object containing update information.

check_schedule()

check_schedule() : integer

Check schedule and get the ID.

Returns

integer —

Schedule ID.

sync_others_data()

sync_others_data(array  $information, array  $data = array()) : array

Sync the BackUpWordPress plugin settings.

Parameters

array $information

Array containing the sync information.

array $data

Array containing the BackUpWordPress plugin data to be synced.

Returns

array —

$information Array containing the sync information.

do_reports_log()

do_reports_log(string  $ext = '') 

Add BackUpWordPress data to the reports database table.

Parameters

string $ext

Current extension.

set_showhide()

set_showhide() : array

Hide or unhide the BackUpWordPress plugin.

Returns

array —

Action result.

delete_schedule()

delete_schedule() : array

Delete schedule.

Returns

array —

Action result.

hmbkp_request_cancel_backup()

hmbkp_request_cancel_backup() : array

Cancel the backup process.

Returns

array —

Action result.

get_backup_status()

get_backup_status() : array

Get the backup process status.

Returns

array —

Action result.

run_schedule()

run_schedule() : array

Run schedule.

Returns

array —

Action result.

reload_backups()

reload_backups() : array

Reload backups.

Returns

array —

Action result.

hmbkp_request_delete_backup()

hmbkp_request_delete_backup() : array

Delete backup.

Returns

array —

Action result.

get_backupslist_html()

get_backupslist_html(object  $schedule) : array

Get backups list HTML.

Parameters

object $schedule

Object containing the schedule data.

Returns

array —

Action result.

hmbkp_get_site_size_text()

hmbkp_get_site_size_text(\HM\BackUpWordPress\Scheduled_Backup  $schedule) : string

Get the site size text.

Parameters

\HM\BackUpWordPress\Scheduled_Backup $schedule

Object containing the schedule data.

Returns

string —

Site size text.

hmbkp_get_backup_row()

hmbkp_get_backup_row(resource  $file, \HM\BackUpWordPress\Scheduled_Backup  $schedule) 

Get the backup table row HTML.

Parameters

resource $file

Backup file.

\HM\BackUpWordPress\Scheduled_Backup $schedule

Object containing the schedule data.

get_excluded()

get_excluded(string  $browse_dir = null) : array

Get excluded files.

Parameters

string $browse_dir

Browse directory path.

Returns

array —

Action result.

directory_browse()

directory_browse() : array

Browse the directory.

Returns

array —

Action result.

hmbkp_add_exclude_rule()

hmbkp_add_exclude_rule() : array

Add exclusion rule.

Returns

array —

Action result.

hmbkp_remove_exclude_rule()

hmbkp_remove_exclude_rule() : array

Remove exclusion rule.

Returns

array —

Action result.

general_exclude_add_rule()

general_exclude_add_rule() : array

General exclusion rules.

Returns

array —

Action result.

update_schedule()

update_schedule() : array

Update backup schedule.

Returns

array —

Action result.

save_all_schedules()

save_all_schedules() : array

Save all backup schedules.

Returns

array —

Action result.

is_activated()

is_activated() : boolean

Check if the BacupWordPress plugin is activated.

Returns

boolean —

Return true if the plugin is activated, false if not.

all_plugins()

all_plugins(array  $plugins) : array

Remove the BackupWordPress plugin from the list of all plugins when the plugin is hidden.

Parameters

array $plugins

Array containing all installed plugins.

Returns

array —

$plugins Array containing all installed plugins without the BackupWordPress.

get_sync_data()

get_sync_data() : array

Get synced BackUpWordPress data.

Returns

array —

Return an array containing the synced data.

render_table_excluded()

render_table_excluded(string  $root_dir, object  $schedule, object  $excludes, object  $user_excludes, string  $new_version) 

Render table of the excluded items.

Parameters

string $root_dir

Root directory.

object $schedule

Object containng the schedule data.

object $excludes

Files to exclude.

object $user_excludes

Excluded by user.

string $new_version

New version.

render_table_files()

render_table_files(object  $files, object  $schedule, string  $directory, string  $root_dir, string  $new_version, integer  $site_size, boolean  $is_size_calculated) 

Render the files table.

Parameters

object $files

Backup files.

object $schedule

Object containng the schedule data.

string $directory

Backups directory.

string $root_dir

Site root directory.

string $new_version

New version.

integer $site_size

Site size.

boolean $is_size_calculated

Check if the size is calculated.

render_table_header_files()

render_table_header_files(string  $root_dir, string  $directory, object  $schedule, string  $new_version, integer  $site_size, boolean  $is_size_calculated) 

Render the backup table header.

Parameters

string $root_dir

Site root directory.

string $directory

Backups directory.

object $schedule

Object containng the schedule data.

string $new_version

New version.

integer $site_size

Site size.

boolean $is_size_calculated

Check if the size is calculated.

render_table_body_files()

render_table_body_files(object  $files, object  $schedule, string  $root_dir, string  $new_version, integer  $site_size, boolean  $is_size_calculated) 

Render the backup table body.

Parameters

object $files

Backup files.

object $schedule

Object containng the schedule data.

string $root_dir

Site root directory.

string $new_version

New version.

integer $site_size

Site size.

boolean $is_size_calculated

Check if the size is calculated.