Skip to content

Commit 62c7baf

Browse files
committed
Using str_replace rather than preg_replace
1 parent 22c58b7 commit 62c7baf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Scaffold_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ function child_theme( $args, $assoc_args ) {
372372
'theme_uri' => ""
373373
) );
374374
$data['slug'] = $theme_slug;
375-
$data['parent_theme_function_safe'] = preg_replace( array( '/\s+/', '-' ), '_', $data['parent_theme'] );
375+
$data['parent_theme_function_safe'] = str_replace( array( ' ', '-' ), '_', $data['parent_theme'] );
376376
$data['description'] = ucfirst( $data['parent_theme'] ) . " child theme.";
377377

378378
$theme_dir = WP_CONTENT_DIR . "/themes" . "/$theme_slug";

0 commit comments

Comments
 (0)