We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d93a71b + f4d139d commit a8163c8Copy full SHA for a8163c8
src/Search_Replace_Command.php
@@ -721,9 +721,13 @@ private static function esc_sql_value( $values ) {
721
private function get_colors( $assoc_args, $colors ) {
722
$color_reset = WP_CLI::colorize( '%n' );
723
724
- $color_codes = implode( '', array_map( function ( $v ) {
+ $color_code_callback = function ( $v ) {
725
return substr( $v, 1 );
726
- }, array_keys( \cli\Colors::getColors() ) ) );
+ };
727
+
728
+ $color_codes = array_keys( \cli\Colors::getColors() );
729
+ $color_codes = array_map( $color_code_callback, $color_codes );
730
+ $color_codes = implode( '', $color_codes );
731
732
$color_codes_regex = '/^(?:%[' . $color_codes . '])*$/';
733
0 commit comments