From 7bdcd247f618d59e605d4c4e13ff1aa45a3e2e24 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 8 May 2026 09:19:53 +0000 Subject: [PATCH 1/2] Initial plan From 360f8850f96ae7a3d2104aa460bfcc4e1e4d8bfb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 8 May 2026 09:27:14 +0000 Subject: [PATCH 2/2] Add locale option to multisite-install docs and coverage Agent-Logs-Url: https://github.com/wp-cli/core-command/sessions/8aeba576-61f1-44df-bd67-4416478fd632 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- README.md | 5 ++++- features/core-install.feature | 2 +- src/Core_Command.php | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 99f746a0..aee0b530 100644 --- a/README.md +++ b/README.md @@ -312,7 +312,7 @@ for more details about how multisite works. Installs WordPress multisite from scratch. ~~~ -wp core multisite-install [--url=] [--base=] [--subdomains] --title= --admin_user= [--admin_password=] --admin_email= [--skip-email] [--skip-config] +wp core multisite-install [--url=] [--base=] [--subdomains] --title= --admin_user= [--admin_password=] --admin_email= [--locale=] [--skip-email] [--skip-config] ~~~ Creates the WordPress tables in the database using the URL, title, and @@ -351,6 +351,9 @@ file with the appropriate multisite rewrite rules. --admin_email= The email address for the admin user. + [--locale=] + The locale/language for the installation (e.g. `de_DE`). Default is `en_US`. + [--skip-email] Don't send an email notification to the new admin user. diff --git a/features/core-install.feature b/features/core-install.feature index 3d57e309..4bb64635 100644 --- a/features/core-install.feature +++ b/features/core-install.feature @@ -326,7 +326,7 @@ Feature: Install WordPress core And a database # The SQLite object cache drop-in might produce a "no such table: wp_options" STDERR during installation. - When I try `wp core multisite-install --url=foobar.org --title=Test --admin_user=wpcli --admin_email=admin@example.com` + When I try `wp core multisite-install --url=foobar.org --title=Test --admin_user=wpcli --admin_email=admin@example.com --locale=de_DE` Then STDOUT should contain: """ Admin password: diff --git a/src/Core_Command.php b/src/Core_Command.php index 8438f664..f041ad09 100644 --- a/src/Core_Command.php +++ b/src/Core_Command.php @@ -601,6 +601,9 @@ public function multisite_convert( $args, $assoc_args ) { * --admin_email= * : The email address for the admin user. * + * [--locale=] + * : The locale/language for the installation (e.g. `de_DE`). Default is `en_US`. + * * [--skip-email] * : Don't send an email notification to the new admin user. * @@ -621,7 +624,7 @@ public function multisite_convert( $args, $assoc_args ) { * @subcommand multisite-install * * @param string[] $args Positional arguments. Unused. - * @param array{url?: string, base: string, subdomains?: bool, title: string, admin_user: string, admin_password?: string, admin_email: string, 'skip-email'?: bool, 'skip-config'?: bool} $assoc_args Associative arguments. + * @param array{url?: string, base: string, subdomains?: bool, title: string, admin_user: string, admin_password?: string, admin_email: string, locale?: string, 'skip-email'?: bool, 'skip-config'?: bool} $assoc_args Associative arguments. */ public function multisite_install( $args, $assoc_args ) { // Fix $_SERVER variables early to prevent incorrect URL detection.