/** * @param bool|string $caller the calling directory * @return array */ protected static function get_locations_caller($caller = false) { $locs = array(); if ($caller && is_string($caller)) { $caller = realpath($caller); if (is_dir($caller)) { $locs[] = $caller; } $caller = trailingslashit($caller); foreach (LocationManager::get_locations_theme_dir() as $dirname) { $caller_sub = realpath($caller . $dirname); if (is_dir($caller_sub)) { $locs[] = $caller_sub; } } } return $locs; }