Properties

$instance

$instance : mixed

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

Type

mixed — Default null

$cron_name_watcher

$cron_name_watcher : string

Cron: Plugin health check watcher.

Type

string

$cron_name_daily

$cron_name_daily : string

Cron: Plugin health check daily.

Type

string

$cron_name_batching

$cron_name_batching : string

Cron: Plugin health check batching.

Type

string

$tran_name_plugin_timestamps

$tran_name_plugin_timestamps : string

Transient: Plugin timestamps.

Type

string

$tran_name_plugins_to_batch

$tran_name_plugins_to_batch : string

Transient: Plugins to batch.

Type

string

$option_name_last_daily_run

$option_name_last_daily_run : string

Transient: Plugin last daily run.

Type

string

Methods

instance()

instance() : mixed

Method instance()

Create a public static instance.

Returns

mixed —

Class instance.

__construct()

__construct() 

MainWP_Child_Plugins_Check constructor.

Run any time class is called.

cleanup_deactivation()

cleanup_deactivation(boolean  $del = true) 

Un-schedules all events attached to the hook with the specified arguments.

On success an integer indicating number of events un-scheduled (0 indicates no events were registered with the hook and arguments combination), false if un-scheduling one or more events fail.

Parameters

boolean $del

Whether or not to delete the transient data. Default: true.

modify_plugin_api_search_query()

modify_plugin_api_search_query(object  $args, string  $action) : \stdClass

Modify plugin API Search Query.

Parameters

object $args

Query arguments.

string $action

Action to perform: query_plugins.

Returns

\stdClass —

$args Modified Search Query.

perform_watchdog()

perform_watchdog() 

Schedule watchdog crons.

Throws

\Exception

Error message on failure.

schedule_watchdog()

schedule_watchdog() 

Schedule a global watchdog cron just in case both other crons get killed.

get_plugins_outdate_info()

get_plugins_outdate_info() : array

Get plugins outdated info.

Returns

array —

$plugins_outdate Array of outdated plugin info.

may_outdate_number_change()

may_outdate_number_change() 

Update Days out of date option.

run_check()

run_check() 

Run plugin update check.

Throws

\Exception

Error message on failure.

cleanup_basic()

cleanup_basic() 

Un-schedules all events attached to the hook with the specified arguments.

On success an integer indicating number of events un-scheduled (0 indicates no events were registered with the hook and arguments combination), false if un-scheduling one or more events fail.

try_get_response_body()

try_get_response_body(string  $plugin, boolean  $second_pass) : boolean|string

Try to get response body.

Parameters

string $plugin

Plugin slug.

boolean $second_pass

Second pass check.

Returns

boolean|string —

true|false The body of the response. Empty string if no body or incorrect parameter given.