function arrange_fields_get_included_module_files in Arrange Fields 7
This function is used to tell the user what module include files have been loaded on the current page, in an effort to help them figure out which to enter as include files on the Arrange Fields settings page.
1 call to arrange_fields_get_included_module_files()
- arrange_fields_form_alter in ./
arrange_fields.module - Implementation of hook_form_alter().
File
- ./
arrange_fields.module, line 1217
Code
function arrange_fields_get_included_module_files() {
$rtn = "";
$arr = get_included_files();
foreach ($arr as $file) {
/**
* This was causing this system to not work correctly, so I am no longer
* going to try to get rid of the basepath.
*/
// Get rid of the basepath information.
//$temp = explode($GLOBALS["base_path"], $file);
//$file = $temp[1];
// Skip anything that doesn't have "modules" in the name.
if (!strstr($file, "modules/")) {
continue;
}
// If it contains ".module", as in, this is a .module file, we do not care.
if (strstr($file, ".module")) {
continue;
}
// if it contains "devel/", "/entity/" or "/field/", or ".field.inc" we do not care.
if (strstr($file, "devel/")) {
continue;
}
if (strstr($file, "/entity/")) {
continue;
}
if (strstr($file, "/field/")) {
continue;
}
if (strstr($file, ".field.inc")) {
continue;
}
// Now, split again on the modules/ string to get just the module and file name.
$temp = explode("modules/", $file);
$file = $temp[1];
// If the result doesn't have a "." in it, skip it.
if (!strstr($file, ".")) {
continue;
}
$rtn .= " <em>{$file}</em> <br>";
}
return $rtn;
}