Properties

$is_plugin_installed

$is_plugin_installed : boolean

Public variable to state if supported plugin is installed on the child site.

Type

boolean — If supported plugin is installed, return true, if not, return false.

$instance

$instance : mixed

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

Type

mixed — Default null

Methods

instance()

instance() : mixed

Method instance()

Create a public static instance.

Returns

mixed —

Class instance.

__construct()

__construct() 

MainWP_Child_Cache_Purge constructor.

Run any time class is called.

sync_others_data()

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

Method sync_others_data()

Sync data to & from the MainWP Dashboard.

Parameters

array $information

Array containing the data to be sent to the Dashboard.

array $data

Array containing the data sent from the Dashboard; to be saved to the Child Site.

Returns

array —

$information Array containing the data to be sent to the Dashboard.

check_cache_solution()

check_cache_solution() 

Check which supported plugin is installed, Set wp_option 'mainwp_cache_control_cache_solution' to active plugin, and set public variable 'is_plugin_installed' to TRUE.

If a supported plugin is not installed check to see if CloudFlair solution is enabled.

auto_purge_cache()

auto_purge_cache() 

Auto purge cache based on which cache plugin is installed & activated.

wp_hummingbird_auto_purge_cache()

wp_hummingbird_auto_purge_cache() 

Purge WP Hummingbird cache after updates.

cache_enabler_auto_purge_cache()

cache_enabler_auto_purge_cache() 

Purge Cache Enabler cache after updates.

w3_total_cache_auto_purge_cache()

w3_total_cache_auto_purge_cache() 

Purge W3 Total Cache after updates.

wp_fastest_cache_auto_purge_cache()

wp_fastest_cache_auto_purge_cache() 

Purge WP Fastest Cache after updates.

swift_performance_auto_purge_cache()

swift_performance_auto_purge_cache() 

Purge Swift Performance Lite Cache after Updates.

sitegrounds_optimizer_auto_purge_cache()

sitegrounds_optimizer_auto_purge_cache() 

Purge SiteGrounds Optimiser Cache after Updates.

cloudflair_auto_purge_cache()

cloudflair_auto_purge_cache() 

Purge Cloudflair Cache after updates.

litespeed_auto_purge_cache()

litespeed_auto_purge_cache() 

Purge LiteSpeed Cache after updates.

breeze_auto_purge_cache()

breeze_auto_purge_cache() 

Purge Breeze cache.

wprocket_auto_cache_purge()

wprocket_auto_cache_purge() 

Purge WP-Rocket cache.

record_results()

record_results(array  $information) 

Record last Purge.

Create log file & Save in /Upload dir.

Parameters

array $information

Array containing the data to be sent to the Dashboard.