function page_title_include_api_files in Page Title 6.2
Same name and namespace in other branches
- 8.2 page_title.module \page_title_include_api_files()
- 7.2 page_title.module \page_title_include_api_files()
Function to ensure API files are included. We use a static variable so we can use include, which is faster than include_one
2 calls to page_title_include_api_files()
- page_title_get_settings in ./
page_title.module - Get the Page Title settings
- page_title_init in ./
page_title.module - Implementation of hook_init().
File
- ./
page_title.module, line 827 - Enhanced control over the page title (in the head tag).
Code
function page_title_include_api_files() {
// Using $runonce, we can ensure the include code below only gets run once.
static $runonce = FALSE;
if ($runonce) {
return;
}
// Include relevant page_title.inc's. We cannot use drupal_load() here due to the folder structure.
// We also avoice using include_once due to its performance hit on the Filesystem
foreach (page_title_get_module_apis() as $module => $info) {
$path = "./{$info['path']}/{$module}.page_title.inc";
if (file_exists($path)) {
include $path;
}
}
$runonce = TRUE;
}