PHP Class WP_MS_Network_Command

Inheritance: extends WP_CLI_Command
Show file Open project: stuttter/wp-multi-network

Protected Properties

Property Type Description
$obj_fields Default fields to display for each object.

Public Methods

Method Description
create ( $args, $assoc_args ) Add a Network
delete ( $args, $assoc_args ) Delete a Network
list_ ( $args, $assoc_args ) List all networks.
move_site ( $args, $assoc_args ) Move to blog to another network
update ( $args, $assoc_args ) Update a Network

Protected Methods

Method Description
get_formatter ( array &$assoc_args ) : WP_CLI\Formatter Get Formatter object based on supplied parameters.

Method Details

create() public method

: Domain for network : Path for network [--site_name=] : Name of new network [--clone_network=] : ID of network to clone [--options_to_clone=] : Options to clone to new network
public create ( $args, $assoc_args )

delete() public method

: ID for network [--delete_blogs=] : Delete blogs in this network
public delete ( $args, $assoc_args )

get_formatter() protected method

Get Formatter object based on supplied parameters.
protected get_formatter ( array &$assoc_args ) : WP_CLI\Formatter
$assoc_args array Parameters passed to command. Determines formatting.
return WP_CLI\Formatter

list_() public method

[--fields=] : Limit the output to specific row fields. [--format=] : Accepted values: table, csv, json, count. Default: table ## AVAILABLE FIELDS These fields will be displayed by default for each term: * id * domain * path
public list_ ( $args, $assoc_args )

move_site() public method

: Site id to move : New network id
public move_site ( $args, $assoc_args )

update() public method

: ID for network : Domain for network [--path=] : Path for network
public update ( $args, $assoc_args )

Property Details

$obj_fields protected property

Default fields to display for each object.
protected $obj_fields