Skip to content
Open
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
6 changes: 6 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[default]
extend-ignore-re = [
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$",
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
"(#|//)\\s*spellchecker:ignore-next-line\\n.*"
]
7 changes: 4 additions & 3 deletions src/DB_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use WP_CLI\Formatter;
use WP_CLI\Utils;
use cli\table\Column;

/**
* Performs basic database operations using credentials stored in wp-config.php.
Expand Down Expand Up @@ -1199,7 +1200,6 @@ public function size( $args, $assoc_args ) {
if ( ! empty( $size_format ) && ! $tables && ! $format && ! $human_readable && true !== $all_tables && true !== $all_tables_with_prefix ) {
WP_CLI::line( str_replace( " {$size_format_display}", '', $rows[0]['Size'] ) );
} else {

// Sort the rows by user input
if ( $orderby ) {
usort(
Expand All @@ -1220,7 +1220,8 @@ function ( $a, $b ) use ( $order, $orderby ) {

// Display the rows.
$args = [
'format' => $format,
'format' => $format,
'alignments' => [ 'Size' => Column::ALIGN_RIGHT ],
];

$formatter = new Formatter( $args, $fields );
Expand Down Expand Up @@ -1816,7 +1817,7 @@ private static function run( $cmd, $assoc_args = [], $send_to_shell = true, $int
$required['default-character-set'] = constant( 'DB_CHARSET' );
}

// Using 'dbuser' as option name to workaround clash with WP-CLI's global WP 'user' parameter, with 'dbpass' also available for tidyness.
// Using 'dbuser' as option name to workaround clash with WP-CLI's global WP 'user' parameter, with 'dbpass' also available for tidiness.
if ( isset( $assoc_args['dbuser'] ) ) {
$required['user'] = $assoc_args['dbuser'];
unset( $assoc_args['dbuser'] );
Expand Down
Loading