From 9fb3dc1ba38a15d1c7b5919427d5c15f6ec753f0 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Sat, 1 Jun 2013 20:10:46 +0000 Subject: [PATCH] Use `get_stylesheet_directory()` instead of `TEMPLATEPATH` when determining where to place a scaffold. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/commands/scaffold.php b/php/commands/scaffold.php index 6b3b1bf0..a9354de1 100644 --- a/php/commands/scaffold.php +++ b/php/commands/scaffold.php @@ -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 ) ) { -- 2.11.0