Skip to content

Commit c200f88

Browse files
Don't need to pass /templates/ as the file path
1 parent 88a2177 commit c200f88

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Scaffold_Command.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public function _s( $args, $assoc_args ) {
306306

307307
if ( true === $unzip_result ) {
308308
$this->create_files( array(
309-
"$theme_path/{$theme_slug}/.editorconfig" => file_get_contents( self::get_template_path( "templates/.editorconfig" ) ),
309+
"$theme_path/{$theme_slug}/.editorconfig" => file_get_contents( self::get_template_path( '.editorconfig' ) ),
310310
), false );
311311
WP_CLI::success( "Created theme '{$data['theme_name']}'." );
312312
} else {
@@ -395,7 +395,7 @@ function child_theme( $args, $assoc_args ) {
395395
$files_written = $this->create_files( array(
396396
$theme_style_path => self::mustache_render( 'child_theme.mustache', $data ),
397397
$theme_functions_path => self::mustache_render( 'child_theme_functions.mustache', $data ),
398-
"$theme_dir/.editorconfig" => file_get_contents( self::get_template_path( "/templates/.editorconfig" ) ),
398+
"$theme_dir/.editorconfig" => file_get_contents( self::get_template_path( '.editorconfig' ) ),
399399
), $force );
400400
$this->log_whether_files_written(
401401
$files_written,
@@ -553,7 +553,7 @@ function plugin( $args, $assoc_args ) {
553553
"$plugin_dir/Gruntfile.js" => self::mustache_render( 'plugin-gruntfile.mustache', $data ),
554554
"$plugin_dir/.gitignore" => self::mustache_render( 'plugin-gitignore.mustache', $data ),
555555
"$plugin_dir/.distignore" => self::mustache_render( 'plugin-distignore.mustache', $data ),
556-
"$plugin_dir/.editorconfig" => file_get_contents( self::get_template_path( "/templates/.editorconfig" ) ),
556+
"$plugin_dir/.editorconfig" => file_get_contents( self::get_template_path( '.editorconfig' ) ),
557557
), $force );
558558

559559
$this->log_whether_files_written(
@@ -773,7 +773,7 @@ private function scaffold_plugin_theme_tests( $args, $assoc_args, $type ) {
773773
}
774774
$files_written[] = $file_name;
775775

776-
$wp_filesystem->copy( self::get_template_path( "/templates/$file" ), $file_name, true );
776+
$wp_filesystem->copy( self::get_template_path( $file ), $file_name, true );
777777
if ( 'install-wp-tests.sh' === $file ) {
778778
if ( ! $wp_filesystem->chmod( "$dir/$file", 0755 ) ) {
779779
WP_CLI::warning( "Couldn't mark 'install-wp-tests.sh' as executable." );

0 commit comments

Comments
 (0)