This page redirects to an external site: https://developer.wordpress.org/reference/functions/get_theme_roots/
Retrieves an array of the names of theme directories keyed by the template/stylesheet or the name of the themes directory if all the themes have the same parent (root) directory. The names are without the trailing but with the leading slash.
<?php echo get_theme_roots(); ?>
This tag has no parameters.
echo get_theme_roots();
If your themes directory is located at /home/www/wp-content/themes/, the above echo statement will output "/themes".
get_theme_roots() is located in wp-includes/theme.php.
Theme paths: get_template(), get_template_directory(), get_template_directory_uri(), get_theme_roots(), get_theme_root(), get_theme_root_uri(), get_stylesheet(), get_stylesheet_uri(), get_stylesheet_directory(), get_stylesheet_directory_uri(), get_bloginfo(), get_theme_file_uri(), get_theme_file_path()