\MainWP\ChildMainWP_Child_Maintenance

Class MainWP_Child_Maintenance

MainWP Maintenance extension handler.

Summary

Methods
Properties
Constants
get_class_name()
__construct()
get_instance()
maintenance_site()
No public properties found
No constants found
maintenance_get_revisions()
$instance
N/A
maintenance_db()
maintenance_delete_revisions()
maintenance_optimize()
maintenance_action()
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

Methods

get_class_name()

get_class_name() : string

Method get_class_name()

Get class name.

Returns

string —

CLASS Class name.

__construct()

__construct() 

MainWP_Child_Maintenance constructor.

Run any time class is called.

get_instance()

get_instance() : mixed

Method get_instance()

Create a public static instance.

Returns

mixed —

Class instance.

maintenance_site()

maintenance_site() 

Method maintenance_site()

Fire off Child Site maintenance action and get feedback.

maintenance_get_revisions()

maintenance_get_revisions(integer  $max_revisions) : array|object|null

Method maintenance_get_revisions()

Get child sites post revisions.

Parameters

integer $max_revisions

Maximum revisions to keep.

Returns

array|object|null —

Database query results.

maintenance_db()

maintenance_db(array  $maint_options, integer  $max_revisions) : array

Method maintenance_db()

Child site database maintenance.

Parameters

array $maint_options

An array containing selected maintenance options.

integer $max_revisions

Maximum revisions to keep.

Returns

array —

An array containing action feedback.

maintenance_delete_revisions()

maintenance_delete_revisions(array|object  $results, integer  $max_revisions) : integer

Method maintenance_delete_revisions()

Delete child site post revisions.

Parameters

array|object $results

Database query results.

integer $max_revisions

Maximum revisions to keep.

Returns

integer —

Return number of revisions deleted.

maintenance_optimize()

maintenance_optimize() 

Method maintenance_optimize()

Optimize Child database.

maintenance_action()

maintenance_action(string  $action) 

Method maintenance_action()

Triggers action to perform, save_settings, enable_alert or clear_settings.

Parameters

string $action

Action to perform.