\MainWP\ChildMainWP_Child_Timecapsule

Class MainWP_Child_Timecapsule

MainWP Time Capsule Extension handler.

Summary

Methods
Properties
Constants
instance()
__construct()
init()
action()
require_files()
set_showhide()
sync_others_data()
get_sync_data()
get_tables()
exclude_file_list()
progress_wptc()
wptc_cron_status()
get_this_backups_html()
start_restore_tc_callback_wptc()
get_sibling_files_callback_wptc()
send_issue_report()
get_logs_rows()
prepare_items()
lazy_load_activity_log_wptc()
get_display_rows()
get_activity_log()
clear_wptc_logs()
stop_fresh_backup_tc_callback_wptc()
get_root_files()
exclude_table_list()
do_site_stats()
do_reports_log()
include_table_list()
include_table_structure_only()
include_file_list()
get_files_by_key()
hash_pwd()
proccess_cust_info()
check_if_cron_service_exists()
signup_wptc_server_wptc()
get_installed_plugins()
get_installed_themes()
is_staging_need_request()
get_staging_details_wptc()
start_fresh_staging_wptc()
get_staging_url_wptc()
stop_staging_wptc()
continue_staging_wptc()
delete_staging_wptc()
copy_staging_wptc()
get_staging_current_status_key()
wptc_sync_purchase()
init_restore()
save_settings_wptc()
analyze_inc_exc()
get_enabled_plugins()
get_enabled_themes()
get_system_info()
update_vulns_settings()
start_fresh_backup_tc_callback_wptc()
save_manual_backup_name_wptc()
all_plugins()
remove_menu()
hide_update_notice()
remove_update_nag()
$instance
$is_plugin_installed
No constants found
get_backups()
No protected properties found
N/A
process_wptc_login()
save_plan_info_limited()
process_privilege_wptc()
process_service_info()
save_settings_backup_tab()
save_settings_backup_auto_tab()
save_settings_vulns_update_tab()
save_settings_staging_opts_tab()
filter_plugins()
filter_themes()
No private properties found
N/A

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 WP Time Capsule plugin is installed on the child site.

Type

boolean — If WP Time Capsule intalled, return true, if not, return false.

Methods

instance()

instance() : mixed

Create a public static instance.

Returns

mixed —

Class instance.

__construct()

__construct() 

MainWP_Child_Timecapsule constructor.

Run any time the class is called.

action()

action() : void

Fire off certain WP Time Capsule plugin actions.

require_files()

require_files() 

Check if required files exist.

set_showhide()

set_showhide() : array

Hide or unhide the WP Time Capsule plugin.

Returns

array —

Action result.

sync_others_data()

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

Sync the WP Time Capsule plugin settings.

Parameters

array $information

Array containing the sync information.

array $data

Array containing the WP Time Capsule plugin data to be synced.

Returns

array —

$information Array containing the sync information.

get_sync_data()

get_sync_data() : array|boolean

Get synced WP Time Capsule data.

Returns

array|boolean —

Return an array containing the synced data, or false on failure.

get_tables()

get_tables() 

Get the WP Time Capsule tables.

exclude_file_list()

exclude_file_list() 

Exlude files from the backup process.

progress_wptc()

progress_wptc() : array

Get backup process progress.

Returns

array —

Action result.

wptc_cron_status()

wptc_cron_status() : array

Get the WP Cron status.

Returns

array —

Action result.

get_this_backups_html()

get_this_backups_html() : array

Get the backups HTML markup.

Returns

array —

Action result.

start_restore_tc_callback_wptc()

start_restore_tc_callback_wptc() 

Start the restore process.

get_sibling_files_callback_wptc()

get_sibling_files_callback_wptc() 

Get sibling files.

send_issue_report()

send_issue_report() 

Send issue report.

get_logs_rows()

get_logs_rows() : array

Get logs rows.

Returns

array —

Action result.

prepare_items()

prepare_items() : array

Prepare items for logs.

Returns

array —

Action result.

get_display_rows()

get_display_rows(array  $records) : string

Display the log rows.

Parameters

array $records

An array of log records.

Returns

string —

Log rows.

get_activity_log()

get_activity_log(array  $sub_records) : string

Get the WP Time Capsule activity log.

Parameters

array $sub_records

Activity log sub-records.

Returns

string —

Activity log HTML.

clear_wptc_logs()

clear_wptc_logs() : array

Clear the WP Time Capsule logs.

Returns

array —

Action result.

stop_fresh_backup_tc_callback_wptc()

stop_fresh_backup_tc_callback_wptc() : array

Stop the WP Time Capsule backup process.

Returns

array —

Action result.

get_root_files()

get_root_files() 

Get the site root files.

exclude_table_list()

exclude_table_list() 

Exclude database tables.

do_reports_log()

do_reports_log(string  $ext = '') 

Add WP Time Capsule data to the reports database table.

Parameters

string $ext

Current extension.

include_table_list()

include_table_list() 

Include database tables.

include_table_structure_only()

include_table_structure_only() 

Include database table structure only.

include_file_list()

include_file_list() 

Include files list.

get_files_by_key()

get_files_by_key() 

Get files by key.

hash_pwd()

hash_pwd(string  $str) : string

Hash password.

Parameters

string $str

String to hash.

Returns

string —

Hashed password.

proccess_cust_info()

proccess_cust_info(object  $options, object  $cust_info) : boolean

Process the sigin response info.

Parameters

object $options

Options object.

object $cust_info

Custon info.

Returns

boolean —

Action result.

check_if_cron_service_exists()

check_if_cron_service_exists(object  $options) : boolean

Process service info.

Parameters

object $options

Options object.

Returns

boolean —

Result.

signup_wptc_server_wptc()

signup_wptc_server_wptc() : boolean

Function for wptc cron service signup

Returns

boolean —

result.

get_installed_plugins()

get_installed_plugins() : array

Get the list of installed plugins.

Returns

array —

Action result.

get_installed_themes()

get_installed_themes() : array

Get the list of installed themes.

Returns

array —

Action result.

is_staging_need_request()

is_staging_need_request() 

Check if staging request needed.

get_staging_details_wptc()

get_staging_details_wptc() 

Get the staging details.

start_fresh_staging_wptc()

start_fresh_staging_wptc() 

Create a fresh staging site.

get_staging_url_wptc()

get_staging_url_wptc() 

Get the staging site URL.

stop_staging_wptc()

stop_staging_wptc() 

Stop the staging site creation process.

continue_staging_wptc()

continue_staging_wptc() 

Continue the staging site creation process.

delete_staging_wptc()

delete_staging_wptc() 

Delete the staging site.

copy_staging_wptc()

copy_staging_wptc() 

Copy the staging site.

get_staging_current_status_key()

get_staging_current_status_key() 

Get the current staging site status key.

wptc_sync_purchase()

wptc_sync_purchase() 

Sync the WP Time Capsule purchase.

init_restore()

init_restore() 

Initiate the restore process.

save_settings_wptc()

save_settings_wptc() 

Save the WP Time Capsule settings.

analyze_inc_exc()

analyze_inc_exc() 

Analyze database tables.

get_enabled_plugins()

get_enabled_plugins() : array

Get enabled plugins.

Returns

array —

Action result.

get_enabled_themes()

get_enabled_themes() : array

Get enabled themes.

Returns

array —

Action result.

get_system_info()

get_system_info() : array

Get the system info.

Returns

array —

Action result.

update_vulns_settings()

update_vulns_settings() : array

Update vulnerable updates settings.

Returns

array —

Action result.

start_fresh_backup_tc_callback_wptc()

start_fresh_backup_tc_callback_wptc() : array

Start a fresh backup.

Returns

array —

Action result.

save_manual_backup_name_wptc()

save_manual_backup_name_wptc() 

Save manual backup name.

all_plugins()

all_plugins(array  $plugins) : array

Remove the WP Time Capsule 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 WP Time Capsule.

remove_menu()

remove_menu() 

Remove the WP Time Capsule menu item when the plugin is hidden.

hide_update_notice()

hide_update_notice(array  $slugs) : array

Remove the WP Time Capsule 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 WP Time Capsule plugin update notice when the plugin is hidden.

Parameters

object $value

Object containing update information.

Returns

object —

$value Object containing update information.

get_backups()

get_backups(string  $last_time = false) : array

Get WP Time Capsule backups.

Parameters

string $last_time

Last completed backup timestamp.

Returns

array —

Returns array of all completed backups.

process_wptc_login()

process_wptc_login() : array

Process the WP Time Capsule login process.

Returns

array —

Action result.

save_plan_info_limited()

save_plan_info_limited(object  $options, object  $cust_info) : boolean

Save the plan info.

Parameters

object $options

Options object.

object $cust_info

Custon info.

Returns

boolean —

Action result.

process_privilege_wptc()

process_privilege_wptc(object  $options, object  $cust_req_info = null) : boolean

Process privilege wptc.

Parameters

object $options

Options object.

object $cust_req_info

Custon info.

Returns

boolean —

Returns false on failure.

process_service_info()

process_service_info(object  $options, object  $cust_info) : boolean

Process service info.

Parameters

object $options

Options object.

object $cust_info

Custon info.

Returns

boolean —

result.

save_settings_backup_tab()

save_settings_backup_tab(object  $config, array  $data) 

Save the WP Time Capsule settings - backups section.

Parameters

object $config

Save config class.

array $data

Data to save.

save_settings_backup_auto_tab()

save_settings_backup_auto_tab(object  $config, array  $data, boolean  $is_general) 

Save the WP Time Capsule settings - backups auto section.

Parameters

object $config

Save config class.

array $data

Data to save.

boolean $is_general

Is general settings check.

save_settings_vulns_update_tab()

save_settings_vulns_update_tab(object  $config, array  $data, boolean  $is_general) 

Save the WP Time Capsule settings - vulnerable updates section.

Parameters

object $config

Save config class.

array $data

Data to save.

boolean $is_general

Is general settings check.

save_settings_staging_opts_tab()

save_settings_staging_opts_tab(object  $config, array  $data, boolean  $is_general) 

Save the WP Time Capsule settings - staging section.

Parameters

object $config

Save config class.

array $data

Data to save.

boolean $is_general

Is general settings check.

filter_plugins()

filter_plugins(array  $included_plugins) : array

Filter plugins.

Parameters

array $included_plugins

List of included plugins.

Returns

array —

Filtered list of plugins.

filter_themes()

filter_themes(array  $included_themes) : array

Filter themes.

Parameters

array $included_themes

List of included themes.

Returns

array —

Filtered list of themes.