Commit a591c866 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#485350 by jhodgdon: better documentation and add code example for module_load_include()

parent fdd3c119
......@@ -243,13 +243,25 @@ function module_load_install($module) {
/**
* Load a module include file.
*
* Examples:
* @code
* // Load node.admin.inc from the node module.
* module_load_include('inc', 'node', 'node.admin');
* // Load content_types.inc from the node module.
* module_load_include('inc', 'node', 'content_types');
* @endcode
*
* Do not use this function to load an install file. Use module_load_install()
* instead.
*
* @param $type
* The include file's type (file extension).
* @param $module
* The module to which the include file belongs.
* @param $name
* Optionally, specify the file name. If not set, the module's name is used.
* Optionally, specify the base file name (without the $type extension).
* If not set, $module is used.
*/
function module_load_include($type, $module, $name = NULL) {
if (empty($name)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment