Skip to content

Commit a34c146

Browse files
Copilotswissspidy
andauthored
Add --locale support to wp core multisite-install command docs and coverage (#331)
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent f0dc0ea commit a34c146

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ for more details about how multisite works.
312312
Installs WordPress multisite from scratch.
313313

314314
~~~
315-
wp core multisite-install [--url=<url>] [--base=<url-path>] [--subdomains] --title=<site-title> --admin_user=<username> [--admin_password=<password>] --admin_email=<email> [--skip-email] [--skip-config]
315+
wp core multisite-install [--url=<url>] [--base=<url-path>] [--subdomains] --title=<site-title> --admin_user=<username> [--admin_password=<password>] --admin_email=<email> [--locale=<locale>] [--skip-email] [--skip-config]
316316
~~~
317317

318318
Creates the WordPress tables in the database using the URL, title, and
@@ -351,6 +351,9 @@ file with the appropriate multisite rewrite rules.
351351
--admin_email=<email>
352352
The email address for the admin user.
353353

354+
[--locale=<locale>]
355+
The locale/language for the installation (e.g. `de_DE`). Default is `en_US`.
356+
354357
[--skip-email]
355358
Don't send an email notification to the new admin user.
356359

‎features/core-install.feature‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ Feature: Install WordPress core
326326
And a database
327327

328328
# The SQLite object cache drop-in might produce a "no such table: wp_options" STDERR during installation.
329-
When I try `wp core multisite-install --url=foobar.org --title=Test --admin_user=wpcli --admin_email=admin@example.com`
329+
When I try `wp core multisite-install --url=foobar.org --title=Test --admin_user=wpcli --admin_email=admin@example.com --locale=de_DE`
330330
Then STDOUT should contain:
331331
"""
332332
Admin password:

‎src/Core_Command.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,9 @@ public function multisite_convert( $args, $assoc_args ) {
601601
* --admin_email=<email>
602602
* : The email address for the admin user.
603603
*
604+
* [--locale=<locale>]
605+
* : The locale/language for the installation (e.g. `de_DE`). Default is `en_US`.
606+
*
604607
* [--skip-email]
605608
* : Don't send an email notification to the new admin user.
606609
*
@@ -621,7 +624,7 @@ public function multisite_convert( $args, $assoc_args ) {
621624
* @subcommand multisite-install
622625
*
623626
* @param string[] $args Positional arguments. Unused.
624-
* @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.
627+
* @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.
625628
*/
626629
public function multisite_install( $args, $assoc_args ) {
627630
// Fix $_SERVER variables early to prevent incorrect URL detection.

0 commit comments

Comments
 (0)