This always returns the URI for the currently active theme, regardless of whether it's a child theme or not. As a result, if you create a child of a whippet theme, you'd have to recreate all the assets in the child theme, as the links all point to the child theme directories.
We could fix this by using get_template_directory_uri() instead, which I've tested locally and seems to work ok.
Is there any reason we've chosen get_stylesheet_directory_uri() instead?
When we enqueue styles in Styles.php & Scripts.php, we use
get_stylesheet_directory_uri()
e.g.https://github.com/dxw/whippet-theme-template/blob/c0e5f5ed8a5eea96f7c582946a58de94ed202cf8/app/Theme/Scripts.php#L21
This always returns the URI for the currently active theme, regardless of whether it's a child theme or not. As a result, if you create a child of a whippet theme, you'd have to recreate all the assets in the child theme, as the links all point to the child theme directories.
We could fix this by using
get_template_directory_uri()
instead, which I've tested locally and seems to work ok.Is there any reason we've chosen
get_stylesheet_directory_uri()
instead?