function heartbeat_include in Heartbeat 6.4
Same name and namespace in other branches
- 6.3 heartbeat.module \heartbeat_include()
Include heartbeat .inc class files
13 calls to heartbeat_include()
- connectedheartbeat.inc in modules/
friendlist_activity/ connectedheartbeat.inc - groupsactivity.inc in modules/
og_activity/ groupsactivity.inc - heartbeat_activity_stream_configure in ./
heartbeat.admin.inc - Callback function to configure a heartbeat stream
- heartbeat_check_access_types in ./
heartbeat.module - Check if there no new heartbeat access types available
- heartbeat_stream_view in ./
heartbeat.module - Helper function to load a heartbeat stream / access type
File
- ./
heartbeat.common.inc, line 11 - Commonly functions used in heartbeat
Code
function heartbeat_include($file, $module = 'heartbeat', $_file_path = '') {
static $loaded = array();
$file = drupal_strtolower($file);
$path = drupal_get_path('module', $module);
$_file_path = empty($_file_path) ? $file . '.inc' : $_file_path;
if (!isset($loaded[$file])) {
$file_path = $path . '/includes/' . $_file_path;
if (is_file($file_path)) {
require $file_path;
$loaded[$file] = TRUE;
return $loaded[$file];
}
$file_path = $path . '/' . $_file_path;
if (is_file($file_path)) {
require $file_path;
$loaded[$file] = TRUE;
}
}
return $loaded[$file];
}