drupal_get_path

includes/common.inc, line 1489

Versions
4.6 – 7
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 functions call 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.
color_scheme_form_submit in modules/color/color.module
Submit handler for color change form.
comment_render in modules/comment/comment.module
Renders comment(s).
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...
forum_page in modules/forum/forum.module
Menu callback; prints a forum listing.
forum_view in modules/forum/forum.module
Implementation of hook_view().
help_main in modules/help/help.module
Menu callback; prints a page listing a glossary of Drupal terminology.
help_page in modules/help/help.module
Menu callback; prints a page listing general help for all modules.
module_load_install in includes/module.inc
Load a module's installation hooks.
node_menu in modules/node/node.module
Implementation of hook_menu().
poll_menu in modules/poll/poll.module
Implementation of hook_menu().
search_form in modules/search/search.module
Render a search form.
system_menu in modules/system/system.module
Implementation of hook_menu().
system_update_132 in modules/system/system.install
system_update_172 in modules/system/system.install
theme_color_scheme_form in modules/color/color.module
Theme color form.
theme_maintenance_page in includes/theme.inc
tracker_page in modules/tracker/tracker.module
Menu callback. Prints a listing of active nodes on the site.
user_menu in modules/user/user.module
Implementation of hook_menu().
watchdog_menu in modules/watchdog/watchdog.module
Implementation of hook_menu().
_color_rewrite_stylesheet in modules/color/color.module
Rewrite the stylesheet to match the colors in the palette.
_locale_string_language_list in includes/locale.inc
List languages in search result table

Code

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

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.