OSDN Git Service

Use `get_stylesheet_directory()` instead of `TEMPLATEPATH` when determining where...
authorDaniel Bachhuber <d@danielbachhuber.com>
Sat, 1 Jun 2013 20:10:46 +0000 (20:10 +0000)
committerDaniel Bachhuber <d@danielbachhuber.com>
Sat, 1 Jun 2013 20:10:46 +0000 (20:10 +0000)
In parent-child theme relationships, `TEMPLATEPATH` will always be the parent theme. We'd like to instead place our CPT/taxonomy in the child theme, as child themes are where the customizations occur.

php/commands/scaffold.php

index 6b3b1bf..a9354de 100644 (file)
@@ -185,7 +185,7 @@ class Scaffold_Command extends WP_CLI_Command {
                extract( $assoc_args, EXTR_SKIP );
 
                if ( $theme ) {
-                       $path = TEMPLATEPATH;
+                       $path = get_stylesheet_directory();
                } elseif ( ! empty( $plugin ) ) {
                        $path = WP_PLUGIN_DIR . '/' . $plugin;
                        if ( !is_dir( $path ) ) {