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; 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'.

Return value

The path to the requested item or an empty string if the item is not found.

File

core/includes/bootstrap.inc, line 258
Functions that need to be loaded on every Drupal request.

Code

function drupal_get_path($type, $name) {
  return dirname(drupal_get_filename($type, $name));
}
doc_Drupal
2016-10-29 09:03:14
Comments
Leave a Comment

Please login to continue.