Properties

$current_plugins_info

$current_plugins_info : array

Old plugins.

Type

array — Old plugins array.

$current_themes_info

$current_themes_info : array

Old themes.

Type

array — Old themes array.

$instance

$instance : mixed

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

Type

mixed — Default null

$init_actions

$init_actions : mixed

Public static variable.

Type

mixed — Default null

$actions_data

$actions_data : mixed

Public static variable.

Type

mixed — Default null

$sending

$sending : mixed

Public static variable.

Type

mixed — Default null

$connected_admin

$connected_admin : mixed

Public static variable.

Type

mixed — Default null.

$enable_actions_notification

$enable_actions_notification : mixed

Public static variable.

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_Callable constructor.

Run any time class is called.

get_instance()

get_instance() : mixed

Method instance()

Create a public static instance.

Returns

mixed —

Class instance.

init_hooks()

init_hooks() 

Method init_hooks().

Init WP hooks.

init_custom_hooks()

init_custom_hooks(string  $actions) 

Method init_custom_hooks().

Init WP custom hooks.

Parameters

string $actions

action name.

get_current_plugins_info()

get_current_plugins_info() 

Method get_current_plugins_info().

Get current plugins info.

get_current_themes_info()

get_current_themes_info() 

Method get_current_themes_info().

Get current themes info.

callback()

callback() 

Callback for all registered hooks.

Looks for a class method with the convention: "callback_{action name}"

get_actions_data()

get_actions_data() 

Method to get actions info.

check_actions_data()

check_actions_data() 

Method to check actions data.

Clear old the action info.

callback_upgrader_process_complete()

callback_upgrader_process_complete(\WP_Upgrader  $upgrader, array  $extra) : boolean

Log plugin installations.

Parameters

\WP_Upgrader $upgrader

WP_Upgrader class object.

array $extra

Extra attributes array.

Returns

boolean —

Return TRUE|FALSE.

callback_activate_plugin()

callback_activate_plugin(string  $slug, boolean  $network_wide = false) 

Activate plugin callback.

Parameters

string $slug

Plugin slug.

boolean $network_wide

Check if network wide.

callback_deactivate_plugin()

callback_deactivate_plugin(string  $slug, boolean  $network_wide = false) 

Decativate plugin callback.

Parameters

string $slug

Plugin slug.

boolean $network_wide

Check if network wide.

callback_switch_theme()

callback_switch_theme(string  $name, string  $theme) 

Switch theme callback.

Parameters

string $name

Theme name.

string $theme

Theme slug.

callback_delete_site_transient_update_themes()

callback_delete_site_transient_update_themes() 

Update theme & transient delete callback.

callback_pre_option_uninstall_plugins()

callback_pre_option_uninstall_plugins() 

Uninstall plugins callback.

callback_deleted_plugin()

callback_deleted_plugin(string  $plugin_file, boolean  $deleted) 

Uninstall plugins callback.

Parameters

string $plugin_file

plugin file name.

boolean $deleted

deleted or not.

callback_automatic_updates_complete()

callback_automatic_updates_complete(string  $update_results) : mixed

Logs WordPress core upgrades

Parameters

string $update_results

Update results.

Returns

mixed —

bool|null.

callback__core_updated_successfully()

callback__core_updated_successfully() 

Core updated successfully callback.

callback_upgrader_pre_install()

callback_upgrader_pre_install() 

Upgrader pre-instaler callback.

get_plugins()

get_plugins() : array

Wrapper method for calling get_plugins().

Returns

array —

Installed plugins.

save_actions()

save_actions(string  $message, array  $args, string  $context, string  $action) 

Log handler.

Parameters

string $message

sprintf-ready error message string.

array $args

sprintf (and extra) arguments to use.

string $context

Context of the event.

string $action

Action of the event.

delete_actions()

delete_actions() 

Delete actions logs.

get_valid_context()

get_valid_context(string  $context) : string

Get valid context.

Parameters

string $context

Context.

Returns

string —

Context label.

get_valid_action()

get_valid_action(string  $action) : string

Get valid action.

Parameters

string $action

action.

Returns

string —

action label.

get_display_name()

get_display_name(mixed  $user) : string

Get the display name of the user

Parameters

mixed $user

User object.

Returns

string —

Return User Login or Display Names.

get_current_agent()

get_current_agent() : string

Get agent.

Returns

string

is_doing_wp_cron()

is_doing_wp_cron() : boolean

True if doing WP Cron, otherwise false.

Returns

boolean

is_cron_enabled()

is_cron_enabled() : boolean

True if native WP Cron is enabled, otherwise false.

Returns

boolean

send_actions_notification()

send_actions_notification(array  $data) 

Method send_installer_notification()

To send email notification for plugins/themes/core change.

Parameters

array $data

Action Data.

check_to_send_actions_notification()

check_to_send_actions_notification() 

Method to get actions info.

update_actions_data()

update_actions_data(integer  $index, array  $data) : boolean

Method to save actions info.

Parameters

integer $index

index.

array $data

Action data .

Returns

boolean —

Return TRUE.