drupal_get_path

Definition

drupal_get_path($type, $name)
includes/common.inc, line 1371

Description

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

Namesort iconDescription
Input validationFunctions to validate user input.

Code

<?php
function drupal_get_path($type, $name) {
  return dirname(drupal_get_filename($type, $name));
}
?>
 
 

Drupal is a registered trademark of Dries Buytaert.