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: Theme health check watcher.

Type

string

$cron_name_daily

$cron_name_daily : string

Cron: Theme health check daily.

Type

string

$cron_name_batching

$cron_name_batching : string

Cron: Theme health check batching.

Type

string

$tran_name_theme_timestamps

$tran_name_theme_timestamps : string

Transient: Theme timestamps.

Type

string

$tran_name_themes_to_batch

$tran_name_themes_to_batch : string

Transient: Themes to batch.

Type

string

$option_name_last_daily_run

$option_name_last_daily_run : string

Transient: Theme last daily run.

Type

string

Methods

instance()

instance() : mixed

Method instance()

Create a public static instance.

Returns

mixed —

Class instance.

__construct()

__construct() 

MainWP_Child_Themes_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_theme_api_search_query()

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

Modify theme api search query.

Parameters

object $args

Query arguments.

string $action

Actions to perform.

Returns

\stdClass —

Return instance of \stdClass.

perform_watchdog()

perform_watchdog() 

Schedule watchdog crons.

Throws

\Exception

Error message on failure.

schedule_watchdog()

schedule_watchdog() 

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

get_themes_outdate_info()

get_themes_outdate_info() : array

Get how long themes have been outdated.

Returns

array —

$themes_outdate Array of themes & how long they have been outdated.

run_check()

run_check() 

Run 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  $theme) : string|boolean

Try to get response body.

Parameters

string $theme

Theme slug.

Returns

string|boolean —

Return response $body or FALSE on failure.