drupal_get_path($type, $name)
Returns the path to a system item (module, theme, etc.).
$type: The type of the item; one of 'core', 'profile', 'module', 'theme', or 'theme_engine'.
$name: The name of the item for which the path is requested. Ignored for $type 'core'.
The path to the requested item or an empty string if the item is not found.
function drupal_get_path($type, $name) { return dirname(drupal_get_filename($type, $name)); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!bootstrap.inc/function/drupal_get_path/8.1.x