OSDN Git Service
(root)
/
wvm
/
wvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a1cc20
)
Changed filename from machinename to slug
author
Jaime Martinez
<jmslbam@gmail.com>
Wed, 6 Feb 2013 17:16:42 +0000
(18:16 +0100)
committer
Jaime Martinez
<jmslbam@gmail.com>
Wed, 6 Feb 2013 17:16:42 +0000
(18:16 +0100)
Because `wp scaffold post-type jm-foo` scaffolds a file name jm_foo.php bacause the machinename hyphens get replaced by underscores.
Same behaviour as the plugin scaffold.
Hyphens should separate words.
php/commands/scaffold.php
patch
|
blob
|
history
diff --git
a/php/commands/scaffold.php
b/php/commands/scaffold.php
index
0061ac5
..
0637854
100644
(file)
--- a/
php/commands/scaffold.php
+++ b/
php/commands/scaffold.php
@@
-121,7
+121,7
@@
class Scaffold_Command extends WP_CLI_Command {
}
if ( $path = $this->get_output_path( $control_args, $subdir ) ) {
- $filename = $path . $
machine_name
.'.php';
+ $filename = $path . $
slug
.'.php';
$this->create_file( $filename, $final_output );