Skip to content

Commit fed9f53

Browse files
author
Sam Eer
committed
Fix wp-cli#4774: Standardize plaintext format name across CLI commands
- Rename 'var_export' format to 'plaintext' in param-dump command - Rename 'var_export' format to 'plaintext' in alias list command - Update documentation and examples to reflect new format name - var_export() function output behavior remains the same The plaintext format name is more descriptive and consistent across both the param-dump and alias list commands.
1 parent 626c666 commit fed9f53

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎php/commands/src/CLI_Alias_Command.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class CLI_Alias_Command extends WP_CLI_Command {
9090
* options:
9191
* - yaml
9292
* - json
93-
* - var_export
93+
* - plaintext
9494
* ---
9595
*
9696
* [--raw]

‎php/commands/src/CLI_Command.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ private function array_find( $arr, $callback ) {
771771
}
772772

773773
/**
774-
* Dumps the list of global parameters, as JSON or in var_export format.
774+
* Dumps the list of global parameters, as JSON or in plaintext format.
775775
*
776776
* ## OPTIONS
777777
*
@@ -783,14 +783,14 @@ private function array_find( $arr, $callback ) {
783783
* ---
784784
* default: json
785785
* options:
786-
* - var_export
786+
* - plaintext
787787
* - json
788788
* ---
789789
*
790790
* ## EXAMPLES
791791
*
792792
* # Dump the list of global parameters.
793-
* $ wp cli param-dump --format=var_export
793+
* $ wp cli param-dump --format=plaintext
794794
* array (
795795
* 'path' =>
796796
* array (
@@ -821,7 +821,7 @@ public function param_dump( $_, $assoc_args ) {
821821
}
822822
}
823823

824-
if ( 'var_export' === Utils\get_flag_value( $assoc_args, 'format' ) ) {
824+
if ( 'plaintext' === Utils\get_flag_value( $assoc_args, 'format' ) ) {
825825
var_export( $spec );
826826
} else {
827827
echo json_encode( $spec );

0 commit comments

Comments
 (0)