drupal_get_path
function drupal_get_path
drupal_get_path($type, $name)
Returns the path to a system item (module, theme, etc.).
Parameters
$type: The type of the item (i.e. theme, theme_engine, module, profile).
$name: The name of the item for which the path is requested.
Return value
The path to the requested item or an empty string if the item is not found.
File
- includes/common.inc, line 2881
- Common functions that many Drupal modules will need to reference.
Code
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/includes!common.inc/function/drupal_get_path/7.x