The default theme directory is registered like this in wp-settings.php
// Register the default theme directory root
register_theme_directory( get_theme_root() );
where
function get_theme_root( $stylesheet_or_template = false ) {
global $wp_theme_directories;
if ( $stylesheet_or_template && $theme_root = get_raw_theme_root( $stylesheet_or_template ) ) {
// Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory.
// This gives relative theme roots the benefit of the doubt when things go haywire.
if ( ! in_array( $theme_root, (array) $wp_theme_directories ) )
$theme_root = WP_CONTENT_DIR . $theme_root;
} else {
$theme_root = WP_CONTENT_DIR . '/themes';
}
return apply_filters( 'theme_root', $theme_root );
}
The functions get_theme_root()
and get_raw_theme_root()
seems to be used in other theme related functions.
I don’t see any theme related pre-defined constants used here so I would think that you are stuck with a plugin đ
Maybe playing around with the global $wp_theme_directories
might get you somewhere?