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) {
4848 $ themeLocation = drupal_get_path ('theme ' , $ theme );
4949 $ fullPath = DRUPAL_ROOT . '/ ' . $ themeLocation . '/ ' . 'pattern-lab/source/_twig-components/ ' ;
5050
51- $ fullPathAlt = DRUPAL_ROOT . '/ ' . $ themeLocation . '/ ' . 'source /_twig-components/ ' ;
51+ $ fullPathAlt = DRUPAL_ROOT . '/ ' . $ themeLocation . '/ ' . 'components /_twig-components/ ' ;
5252
5353 if (file_exists ($ fullPathAlt )){
5454 $ fullPath = $ fullPathAlt ;
5555 }
5656
5757 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+ }
6163 }
6264 }
6365 }
You can’t perform that action at this time.
0 commit comments