- // Make sure $root ends with a slash / if it's not blank
- if ($root !== '' && $root[strlen($root) - 1] !== '/') {
- $root = $root . '/';
- }
- $theme_info = \get_app()->theme_info;
- if (is_array($theme_info) && array_key_exists('extends', $theme_info)) {
- $parent = $theme_info['extends'];
- } else {
- $parent = 'NOPATH';
- }
- $theme = \get_app()->getCurrentTheme();
- $parent = Strings::sanitizeFilePathItem($parent);
- $ext = substr($file, strrpos($file, '.') + 1);