\MainWP\DashboardMainWP_WP_CLI_Command

Class MainWP_WP_CLI_Command

Manage all child sites added to the MainWP Dashboard.

Summary

Methods
Properties
Constants
init()
init_wpcli_commands()
sites()
site()
updates()
sync()
reconnect()
plugin()
theme()
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

init()

init() 

Method init()

Initiate the MainWP CLI after all Plugins have loaded.

init_wpcli_commands()

init_wpcli_commands() 

Method init_wpcli_commands

Adds the MainWP WP CLI Commands via WP_CLI::add_command

sites()

sites(array  $args, array  $assoc_args) 

List information about added child sites.

OPTIONS

[--list] : Get a list of all child sites

[--count] : If set, count child sites.

EXAMPLES

wp mainwp sites --list
wp mainwp sites --all-sites-count

Synopsis [--list] [--all-sites-count]

Parameters

array $args

Function arguments.

array $assoc_args

Function associate arguments.

site()

site(array  $args, array  $assoc_args) 

Site commands.

OPTIONS

[--site] : Get site data

[--site-info] : If set, get site info.

EXAMPLES

wp mainwp site --site [<websiteid>]
wp mainwp site --site-info [<websiteid>]

Synopsis [--site] [--site-info] [...]

Parameters

array $args

Function arguments.

array $assoc_args

Function associate arguments.

updates()

updates(array  $args, array  $assoc_args) 

Updates commands.

OPTIONS

[--available-updates] : Get available updates

[--ignored-plugins-updates] : If set, get ignored plugins updates.

EXAMPLES

wp mainwp updates --available-updates
wp mainwp updates --ignored-plugins-updates

Synopsis [--available-updates] [--ignored-plugins-updates] [...]

Parameters

array $args

Function arguments.

array $assoc_args

Function associate arguments.

sync()

sync(array  $args, array  $assoc_args) 

Sync Data with Child Sites

OPTIONS

[] : The id (or ids, comma separated) of the child sites that need to be synced.

[--all] : If set, all child sites will be synced.

EXAMPLES

wp mainwp sync 2,5
wp mainwp sync --all

Synopsis [] [--all]

Parameters

array $args

Function arguments.

array $assoc_args

Function associate arguments.

reconnect()

reconnect(array  $args, array  $assoc_args) 

Reconnect with Child Sites

OPTIONS

[] : The id (or ids, comma separated) of the child sites that need to be reconnect.

EXAMPLES

wp mainwp reconnect 2,5

Synopsis []

Parameters

array $args

Function arguments.

array $assoc_args

Function associate arguments.

plugin()

plugin(array  $args, array  $assoc_args) 

List information about plugin updates

OPTIONS

[] : The id (or ids, comma separated) of the child sites that need to be listed/upgraded, when omitted all childsites are used.

[--list] : Get a list of plugins with available updates

[--list-all] : List all plugins

[--upgrade=] : Update the plugin slugs

[--upgrade-all] : Update all plugins

EXAMPLES

wp mainwp plugin 2,5 --list
wp mainwp plugin --list
wp mainwp plugin 2,5 --list-all
wp mainwp plugin 2,5 --upgrade-all
wp mainwp plugin 2,5 --upgrade=mainwpchild

Synopsis [] [--list] [--list-all] [--upgrade=] [--upgrade-all]

Parameters

array $args

Function arguments.

array $assoc_args

Function associate arguments.

theme()

theme(array  $args, array  $assoc_args) 

List information about theme updates

OPTIONS

[] : The id (or ids, comma separated) of the child sites that need to be listed/upgraded, when omitted all childsites are used.

[--list] : Get a list of themes with available updates

[--list-all] : list all themes

[--upgrade=] : Update the themes

[--upgrade-all] : Update all themes

EXAMPLES

wp mainwp theme 2,5 --list
wp mainwp theme --list
wp mainwp theme 2,5 --upgrade-all
wp mainwp theme 2,5 --upgrade=twentysixteen

Synopsis [] [--list] [--list-all] [--upgrade=] [--upgrade-all]

Parameters

array $args

Function arguments.

array $assoc_args

Function associate arguments.