\MainWP\DashboardMainWP_Updates_Handler

Class MainWP_Updates_Handler

Summary

Methods
Properties
Constants
get_class_name()
upgrade_site()
upgrade_website()
ignore_plugin_theme()
unignore_plugin_theme()
ignore_plugins_themes()
unignore_plugins_themes()
unignore_abandoned_plugin_theme()
unignore_abandoned_plugins_themes()
dismiss_plugin_theme()
dismiss_plugins_themes()
upgrade_plugin_theme_translation()
update_plugin_theme_translation()
get_plugin_theme_slugs()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get_class_name()

get_class_name() : string

Get Class Name

Returns

string —

CLASS

upgrade_site()

upgrade_site(integer  $id) : string

Method upgrade_site()

Check Child Site ID & Update.

Parameters

integer $id

Child site ID.

Throws

\MainWP\Dashboard\MainWP_Exception

Error messages.

Returns

string

upgrade_website()

upgrade_website(object  $website) : mixed|false

Method upgrade_website()

Update WP for site.

Parameters

object $website

Child site object.

Throws

\MainWP\Dashboard\MainWP_Exception

Error message.

Returns

mixed|false —

update result or false.

ignore_plugin_theme()

ignore_plugin_theme(mixed  $type, mixed  $slug, mixed  $name, mixed  $id) : string

Add a plugin or theme to the ignor list.

Parameters

mixed $type

plugin|theme.

mixed $slug

Plugin or Theme Slug.

mixed $name

Plugin or Theme Name.

mixed $id

Child Site ID.

Returns

string —

success.

unignore_plugin_theme()

unignore_plugin_theme(mixed  $type, mixed  $slug, mixed  $id) : string

Remove a plugin or theme from the ignore list.

Parameters

mixed $type

plugin|theme.

mixed $slug

Plugin or Theme slug.

mixed $id

Plugin or Theme name.

Returns

string —

success.

ignore_plugins_themes()

ignore_plugins_themes(string  $type, string  $slug, string  $name) : string

Method ignore_plugins_themes()

Ignore Plugins or Themes.

Parameters

string $type

Plugin or theme.

string $slug

Plugin or tempheme slug.

string $name

Plugin or theme name.

Returns

string —

'success'.

unignore_plugins_themes()

unignore_plugins_themes(mixed  $type, mixed  $slug) : string

Unignore Plugins or Themes.

Parameters

mixed $type

plugin|themes.

mixed $slug

Plugin or Themes slug.

Returns

string —

success.

unignore_abandoned_plugin_theme()

unignore_abandoned_plugin_theme(mixed  $type, mixed  $slug, mixed  $id) : string

Unignor abandoned plugins or themes.

Parameters

mixed $type

plugin|themes.

mixed $slug

Plugin or Themes slug.

mixed $id

Child Site ID.

Returns

string —

success.

unignore_abandoned_plugins_themes()

unignore_abandoned_plugins_themes(mixed  $type, mixed  $slug) : string

Unignore abandoned plugins or themes.

Parameters

mixed $type

plugin|theme.

mixed $slug

Plugin or Themes slug.

Returns

string —

success.

dismiss_plugin_theme()

dismiss_plugin_theme(mixed  $type, mixed  $slug, mixed  $name, mixed  $id) : string

Dismis Plugin or Theme.

Parameters

mixed $type

plugin|theme.

mixed $slug

Plugin or Theme slug.

mixed $name

Plugin or Theme name.

mixed $id

Child Site ID.

Returns

string —

success.

dismiss_plugins_themes()

dismiss_plugins_themes(mixed  $type, mixed  $slug, mixed  $name) : string

Dismiss plugins or themes.

Parameters

mixed $type

plugin|theme.

mixed $slug

Plugin or Theme slug.

mixed $name

Plugin or Theme name.

Returns

string —

success.

upgrade_plugin_theme_translation()

upgrade_plugin_theme_translation(integer  $id, string  $type, array  $list_items) : array

Method upgrade_plugin_theme_translation()

Upgrade plugin or theme translations.

Parameters

integer $id

Child site ID.

string $type

Plugin or theme.

array $list_items

List of theme or plugin names seperated by comma.

Throws

\MainWP\Dashboard\MainWP_Exception

Error messages.

Returns

array

update_plugin_theme_translation()

update_plugin_theme_translation(integer  $website, string  $type, array  $list_items) : array|false

Method update_plugin_theme_translation()

Upgrade plugin or theme translations.

Parameters

integer $website

Child site object.

string $type

Plugin or theme.

array $list_items

List of theme or plugin names seperated by comma.

Throws

\Exception

Error message.

Returns

array|false —

update result or false.

get_plugin_theme_slugs()

get_plugin_theme_slugs(integer  $id, string  $type) : array

Get plugin or theme slugs.

Parameters

integer $id

Child Site ID.

string $type

plugin|theme.

Returns

array —

List of plugins or themes.