8.2.x bootstrap.inc drupal_get_path($type, $name)
8.0.x bootstrap.inc drupal_get_path($type, $name)
8.1.x bootstrap.inc drupal_get_path($type, $name)
8.3.x bootstrap.inc drupal_get_path($type, $name)
4.6.x common.inc drupal_get_path($type, $name)
4.7.x common.inc drupal_get_path($type, $name)
5.x common.inc drupal_get_path($type, $name)
6.x common.inc drupal_get_path($type, $name)
7.x common.inc 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).

$name: The name of the item for which the path is requested.

Return value

The path to the requested item.

Related topics

26 calls to drupal_get_path()
aggregator_menu in modules/aggregator/aggregator.module
Implementation of hook_menu().
block_admin_display in modules/block/block.module
Generate main block administration form.
book_menu in modules/book/book.module
Implementation of hook_menu().
color_get_info in modules/color/color.module
Retrieve the color.module info for a particular theme.
color_scheme_form in modules/color/color.module
Form callback. Returns the configuration form.

... See full list

File

includes/common.inc, line 1513
Common functions that many Drupal modules will need to reference.

Code

function drupal_get_path($type, $name) {
  return dirname(drupal_get_filename($type, $name));
}