Skip to content

Commit decd726

Browse files
Merge pull request #40 from eliseferguson/bug/parent-theme-spaces
Transform spaces to underscores when scaffolding a child theme
2 parents 69cc0c6 + 62c7baf commit decd726

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Scaffold_Command.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,7 @@ function child_theme( $args, $assoc_args ) {
372372
'theme_uri' => ""
373373
) );
374374
$data['slug'] = $theme_slug;
375-
$data['parent_theme_function_safe'] = str_replace( '-', '_', $data['parent_theme'] );
376-
375+
$data['parent_theme_function_safe'] = str_replace( array( ' ', '-' ), '_', $data['parent_theme'] );
377376
$data['description'] = ucfirst( $data['parent_theme'] ) . " child theme.";
378377

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

0 commit comments

Comments
 (0)