Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion entity-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
WP_CLI::add_command( 'site option', 'Site_Option_Command', array(
'before_invoke' => function() {
if ( !is_multisite() ) {
WP_CLI::error( 'This is not a multisite install.' );
WP_CLI::error( 'This is not a multisite installation.' );
}
}
) );
Expand Down
6 changes: 3 additions & 3 deletions features/site-empty.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Feature: Empty a WordPress site of its data

Scenario: Empty a site
Given a WP install
Given a WP installation
And I run `wp option update uploads_use_yearmonth_folders 0`
And download:
| path | url |
Expand All @@ -13,7 +13,7 @@ Feature: Empty a WordPress site of its data
When I try `wp site url 1`
Then STDERR should be:
"""
Error: This is not a multisite install.
Error: This is not a multisite installation.
"""
And the return code should be 1

Expand Down Expand Up @@ -43,7 +43,7 @@ Feature: Empty a WordPress site of its data
Then STDOUT should be empty

Scenario: Empty a site and its uploads directory
Given a WP multisite install
Given a WP multisite installation
And I run `wp site create --slug=foo`
And I run `wp --url=example.com/foo option update uploads_use_yearmonth_folders 0`
And download:
Expand Down
10 changes: 5 additions & 5 deletions features/site-option.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Feature: Manage WordPress site options

Scenario: Site Option CRUD
Given a WP multisite install
Given a WP multisite installation

# String values
When I run `wp site option add str_opt 'bar'`
Expand Down Expand Up @@ -111,24 +111,24 @@ Feature: Manage WordPress site options
"""

Scenario: Error on single install
Given a WP install
Given a WP installation

When I try `wp site option get str_opt`
Then STDERR should be:
"""
Error: This is not a multisite install.
Error: This is not a multisite installation.
"""
And the return code should be 1

When I try `wp site option add str_opt 'bar'`
Then STDERR should be:
"""
Error: This is not a multisite install.
Error: This is not a multisite installation.
"""
And the return code should be 1

Scenario: Filter options by `--site_id`
Given a WP multisite install
Given a WP multisite installation

When I run `wp db query "INSERT INTO wp_sitemeta (site_id,meta_key,meta_value) VALUES (2,'wp_cli_test_option','foobar');"`
Then the return code should be 0
Expand Down
14 changes: 7 additions & 7 deletions src/Site_Command.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Creates, deletes, empties, moderates, and lists one or more sites on a multisite install.
* Creates, deletes, empties, moderates, and lists one or more sites on a multisite installation.
*
* ## EXAMPLES
*
Expand Down Expand Up @@ -223,7 +223,7 @@ public function _empty( $args, $assoc_args ) {
}

/**
* Deletes a site in a multisite install.
* Deletes a site in a multisite installation.
*
* ## OPTIONS
*
Expand All @@ -247,7 +247,7 @@ public function _empty( $args, $assoc_args ) {
*/
function delete( $args, $assoc_args ) {
if ( !is_multisite() ) {
WP_CLI::error( 'This is not a multisite install.' );
WP_CLI::error( 'This is not a multisite installation.' );
}

if ( isset( $assoc_args['slug'] ) ) {
Expand Down Expand Up @@ -280,7 +280,7 @@ function delete( $args, $assoc_args ) {
}

/**
* Creates a site in a multisite install.
* Creates a site in a multisite installation.
*
* ## OPTIONS
*
Expand Down Expand Up @@ -309,7 +309,7 @@ function delete( $args, $assoc_args ) {
*/
public function create( $_, $assoc_args ) {
if ( !is_multisite() ) {
WP_CLI::error( 'This is not a multisite install.' );
WP_CLI::error( 'This is not a multisite installation.' );
}

global $wpdb, $current_site;
Expand Down Expand Up @@ -431,7 +431,7 @@ private function _get_network( $network_id ) {
}

/**
* Lists all sites in a multisite install.
* Lists all sites in a multisite installation.
*
* ## OPTIONS
*
Expand Down Expand Up @@ -496,7 +496,7 @@ private function _get_network( $network_id ) {
*/
public function list_( $_, $assoc_args ) {
if ( !is_multisite() ) {
WP_CLI::error( 'This is not a multisite install.' );
WP_CLI::error( 'This is not a multisite installation.' );
}

global $wpdb;
Expand Down