From 6648829eaebcfb5b8b5027771e483c824de0151f Mon Sep 17 00:00:00 2001 From: Nilambar Sharma Date: Mon, 4 Mar 2024 15:13:16 +0545 Subject: [PATCH] Update core commands docs --- README.md | 14 +++++++++----- src/Core_Command.php | 15 +++++++++------ 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b01831b7..7b6de3a7 100644 --- a/README.md +++ b/README.md @@ -205,19 +205,21 @@ Determines whether WordPress is installed by checking if the standard database tables are installed. Doesn't produce output; uses exit codes to communicate whether WordPress is installed. +**OPTIONS** + [--network] Check if this is a multisite installation. **EXAMPLES** - # Bash script for checking if WordPress is not installed + # Bash script for checking if WordPress is not installed. if ! wp core is-installed 2>/dev/null; then # WP is not installed. Let's try installing it. wp core install fi - # Bash script for checking if WordPress is installed, with fallback + # Bash script for checking if WordPress is installed, with fallback. if wp core is-installed 2>/dev/null; then # WP is installed. Let's do some things we should only do in a confirmed WP environment. @@ -408,6 +410,8 @@ Runs the WordPress database update procedure. wp core update-db [--network] [--dry-run] ~~~ +**OPTIONS** + [--network] Update databases for all sites on a network @@ -416,14 +420,14 @@ wp core update-db [--network] [--dry-run] **EXAMPLES** - # Update the WordPress database + # Update the WordPress database. $ wp core update-db Success: WordPress database upgraded successfully from db version 36686 to 35700. - # Update databases for all sites on a network + # Update databases for all sites on a network. $ wp core update-db --network WordPress database upgraded successfully from db version 35700 to 29630 on example.com/ - Success: WordPress database upgraded on 123/123 sites + Success: WordPress database upgraded on 123/123 sites. diff --git a/src/Core_Command.php b/src/Core_Command.php index 8f59e30e..80139080 100644 --- a/src/Core_Command.php +++ b/src/Core_Command.php @@ -346,19 +346,21 @@ function () use ( $temp ) { * database tables are installed. Doesn't produce output; uses exit codes * to communicate whether WordPress is installed. * + * ## OPTIONS + * * [--network] * : Check if this is a multisite installation. * * ## EXAMPLES * - * # Bash script for checking if WordPress is not installed + * # Bash script for checking if WordPress is not installed. * * if ! wp core is-installed 2>/dev/null; then * # WP is not installed. Let's try installing it. * wp core install * fi * - * # Bash script for checking if WordPress is installed, with fallback + * # Bash script for checking if WordPress is installed, with fallback. * * if wp core is-installed 2>/dev/null; then * # WP is installed. Let's do some things we should only do in a confirmed WP environment. @@ -367,7 +369,6 @@ function () use ( $temp ) { * # Fallback if WP is not installed. * echo 'Hey Friend, you are in the wrong spot. Move in to your WordPress directory and try again.' * fi - * * @subcommand is-installed */ @@ -1223,6 +1224,8 @@ public function update( $args, $assoc_args ) { /** * Runs the WordPress database update procedure. * + * ## OPTIONS + * * [--network] * : Update databases for all sites on a network * @@ -1231,14 +1234,14 @@ public function update( $args, $assoc_args ) { * * ## EXAMPLES * - * # Update the WordPress database + * # Update the WordPress database. * $ wp core update-db * Success: WordPress database upgraded successfully from db version 36686 to 35700. * - * # Update databases for all sites on a network + * # Update databases for all sites on a network. * $ wp core update-db --network * WordPress database upgraded successfully from db version 35700 to 29630 on example.com/ - * Success: WordPress database upgraded on 123/123 sites + * Success: WordPress database upgraded on 123/123 sites. * * @subcommand update-db */