File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,18 @@ static protected function loadAll($type) {
48
48
$ themeLocation = drupal_get_path ('theme ' , $ theme );
49
49
$ fullPath = DRUPAL_ROOT . '/ ' . $ themeLocation . '/ ' . 'pattern-lab/source/_twig-components/ ' ;
50
50
51
- $ fullPathAlt = DRUPAL_ROOT . '/ ' . $ themeLocation . '/ ' . 'source /_twig-components/ ' ;
51
+ $ fullPathAlt = DRUPAL_ROOT . '/ ' . $ themeLocation . '/ ' . 'components /_twig-components/ ' ;
52
52
53
53
if (file_exists ($ fullPathAlt )){
54
54
$ fullPath = $ fullPathAlt ;
55
55
}
56
56
57
57
foreach (scandir ($ fullPath . $ type ) as $ file ) {
58
- if ($ file [0 ] != '. ' && $ file [0 ] != '_ ' ) {
59
- // print_r($file);
60
- static ::load ($ type , $ fullPath . $ type . '/ ' . $ file );
58
+ $ fileInfo = pathinfo ($ file );
59
+ if ($ fileInfo ['extension ' ] === 'php ' ) {
60
+ if ($ file [0 ] != '. ' && $ file [0 ] != '_ ' && substr ($ file , 0 , 2 ) != 'd_ ' ) {
61
+ static ::load ($ type , $ fullPath . $ type . '/ ' . $ file );
62
+ }
61
63
}
62
64
}
63
65
}
You can’t perform that action at this time.
0 commit comments