Problem/Motivation
When running drush radix with a kit that includes alterations in the include files, those files do not get automatically updated with the new subtheme's Name, Description or machine name.
Proposed resolution
Add the include files into the $files_to_replace array when generating a new subtheme.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | radix-search_includes_during-2847486-3.patch | 686 bytes | bneil |
Comments
Comment #2
bneil commentedComment #3
bneil commentedHere is a patch that uses the
scandir()function to search the specified kit for includes and add them to the $files_to_replace array.In my testing and on the php.net scandir() documentation page, the
scandir()function also returns array items of '.' and '..' which are not desirable. To remove those, I usedarray_diff()instead ofarray_slice()in case other operating systems do not include those items.Comment #4
shadcn commentedYeah this looks good. Testing...
Comment #5
shadcn commentedComment #6
adam-delaney commentedI've tested this creating my own starter kit and using {{machine_name}} pattern and it works great.
Comment #7
shadcn commentedLooks good. Will commit.
Comment #9
shadcn commentedCommitted. Thanks @bneil. Thanks @adam-delaney.