Properties

$instance

$instance : mixed

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

Type

mixed — Default null

$filterFunction

$filterFunction : object

Private variable to filter update transients without last_checked and checked fields.

Type

object — Filter update transients.

Methods

get_class_name()

get_class_name() : string

Method get_class_name()

Get class name.

Returns

string —

CLASS Class name.

__construct()

__construct() 

MainWP_Child_Updates constructor.

Run any time class is called.

get_instance()

get_instance() : mixed

Method get_instance()

Create a public static instance.

Returns

mixed —

Class instance.

upgrade_plugin_theme()

upgrade_plugin_theme() 

Method upgrade_plugin_theme()

Fire off plugins and themes updates and write feedback to the synchronization information.

upgrade_get_theme_updates()

upgrade_get_theme_updates() : array

Method upgrade_get_theme_updates()

Get theme updates information.

Returns

array —

An array of available theme updates information.

hook_fix_optimize_press_theme_update()

hook_fix_optimize_press_theme_update(object  $transient) : object

Method hook_fix_optimize_press_theme_update()

Cutom support for the Optimize Press theme.

Parameters

object $transient

Object containig the update transient information.

Returns

object —

$transient Object containig the update transient information.

set_cached_update_plugins()

set_cached_update_plugins(boolean  $false_value = false, object  $_transient_data = null) : object

Method set_cached_update_plugins()

Support cached premium plugins update info, hooking in the bulk_upgrade().

Parameters

boolean $false_value

true|false.

object $_transient_data

Contains the transient data.

Returns

object —

$_transient_data Contains the updated transient data.

set_cached_update_themes()

set_cached_update_themes(boolean  $false_value = false, object  $_transient_data = null) : object

Method set_cached_update_themes()

Support cached premium themes update info, hooking in the bulk_upgrade().

Parameters

boolean $false_value

true|false.

object $_transient_data

Contains the transient data.

Returns

object —

$_transient_data Contains the updated transient data.

upgrade_wp()

upgrade_wp() 

Method upgrade_wp()

Initiate the WordPress core files update.

upgrade_translation()

upgrade_translation() 

Method upgrade_translation()

Update translations and set feedback to the sync information.

include_updates()

include_updates() 

Method include_updates()

Include WP Core files required for performing updates.

upgrade_plugin()

upgrade_plugin(array  $information, array  $mwp_premium_updates_todo, array  $mwp_premium_updates_todo_slugs, boolean  $premiumUpgrader) 

Method upgrade_plugin()

Initiate the plugin update process.

Parameters

array $information

An array containing the synchronization information.

array $mwp_premium_updates_todo

An array containing the list of premium plugins to update.

array $mwp_premium_updates_todo_slugs

An array containing the list of premium plugins slugs to update.

boolean $premiumUpgrader

If true, use premium upgrader.

check_update_requires()

check_update_requires(array  $plugins) : array

Method check_update_requires()

Check update requires.

Parameters

array $plugins

An array containing plugins to be updated.

Throws

\MainWP\Child\Exception|\Exception

Error Exception.

Returns

array —

An array of available plugins updates.

to_update_plugins()

to_update_plugins(array  $information, array  $plugins) 

Method to_update_plugins()

Complete the plugins update process.

Parameters

array $information

An array containing the synchronization information.

array $plugins

An array containing plugins to be updated.

upgrade_theme()

upgrade_theme(array  $information, array  $mwp_premium_updates_todo, array  $mwp_premium_updates_todo_slugs, boolean  $premiumUpgrader) 

Method upgrade_theme()

Execute themes updates.

Parameters

array $information

An array containing the synchronization information.

array $mwp_premium_updates_todo

An array containing the list of premium themes to update.

array $mwp_premium_updates_todo_slugs

An array containing the list of premium themes slugs to update.

boolean $premiumUpgrader

If true, use premium upgrader.

to_upgrade_themes()

to_upgrade_themes(array  $information, array  $themes, string  $last_update) 

Method to_upgrade_themes()

Complete the themes update process.

Parameters

array $information

An array containing the synchronization information.

array $themes

An array containing themes to be updated.

string $last_update

Contains the last update timestamp.

update_premiums_todo()

update_premiums_todo(array  $information, boolean  $premiumUpgrader, array  $mwp_premium_updates_todo, array  $mwp_premium_updates_todo_slugs) 

Method update_premiums_todo()

Update premium plugins.

Parameters

array $information

An array containing the synchronization information.

boolean $premiumUpgrader

If true, use premium upgrader.

array $mwp_premium_updates_todo

An array containing the list of premium themes to update.

array $mwp_premium_updates_todo_slugs

An array containing the list of premium themes slugs to update.

to_support_some_premiums_updates()

to_support_some_premiums_updates(array  $plugins) 

Method to_support_some_premiums_updates()

Custom support for some premium plugins.

Parameters

array $plugins

An array containing installed plugins information.

do_upgrade_wp()

do_upgrade_wp(array  $information) 

Method do_upgrade_wp()

Run the WordPress Core update.

Parameters

array $information

An array containing the synchronization information.

check_core_updater_locked()

check_core_updater_locked() : boolean

Method check_core_updater_locked()

Check core updater locked.

Returns

boolean —

true locked.