Same name and namespace in other branches
- 4.6.x includes/common.inc \drupal_get_path()
- 4.7.x includes/common.inc \drupal_get_path()
- 6.x includes/common.inc \drupal_get_path()
- 7.x includes/common.inc \drupal_get_path()
- 8.9.x core/includes/bootstrap.inc \drupal_get_path()
- 9 core/includes/bootstrap.inc \drupal_get_path()
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ā¦
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));
}