8.5.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.2.x bootstrap.inc drupal_get_path($type, $name)
8.3.x bootstrap.inc drupal_get_path($type, $name)
8.4.x bootstrap.inc drupal_get_path($type, $name)
8.6.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

18 calls to drupal_get_path()
block_admin_display in modules/block/block.module
Generate main block administration form.
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.
color_scheme_form_submit in modules/color/color.module
Submit handler for color change form.
drupal_maintenance_theme in includes/bootstrap.inc
Enables use of the theme system without requiring database access. Since there is not database access no theme will be enabled and the default themeable functions will be called. Some themeable functions can not be used without the full Drupal API…

... 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));
}