Skip to content

Commit d75d7b0

Browse files
authored
Update src/WP_CLI/CommandWithUpgrade.php
1 parent f2a47bb commit d75d7b0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/WP_CLI/CommandWithUpgrade.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ public function install( $args, $assoc_args ) {
188188
$successes = 0;
189189
$errors = 0;
190190
$custom_slug = Utils\get_flag_value( $assoc_args, 'slug', false );
191+
if ( $custom_slug ) {
192+
$custom_slug = sanitize_file_name( $custom_slug );
193+
}
191194

192195
if ( $custom_slug && count( $args ) > 1 ) {
193196
WP_CLI::error( 'The --slug option can only be used when installing a single item.' );

0 commit comments

Comments
 (0)