#7694 closed defect (bug) (fixed)
Minified assets not enqueued when in child theme
Reported by: | pscolv | Owned by: | djpaul |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.9.3 |
Component: | Templates | Keywords: | |
Cc: |
Description
I'm using my own buddypress.js and buddypress.css files within my child theme. Unfortunately, when trying to minify those, I noticed that the original file was still being enqueued. This behaviour differs from the bp-legacy folder, where the minified file is chosen by default.
When digging into the code, I noticed that the buddypress-functions.php indeed doesn't try and look for minified assets in child themes.
This can be fixed easily in the locate_asset_in_stack function. I already modified the code and tested accordingly (see attached patch). With this new code, either minified or un-minified child theme assets are loaded, depending which version exists.
Regards,
Pascal.
Attachments (2)
Change History (8)
#2
@
7 years ago
- Milestone changed from Awaiting Review to Under Consideration
Hi @pscolv
Thanks for getting in contact. This looks like a good spot, and we'll have to take a look at this. Your patch is high quality, so with luck, we can just drop it in once we confirm the issue!
#3
@
7 years ago
- Milestone changed from Under Consideration to 3.0
Confirmed. Good patch - thanks so much @pscolv :)
One remark though : when running the "ongoing" buddypress version from the SVN repository, I noticed that there are many issues related to js scripts loading (which occurred even without my buddypress-functions.php changes). I joined a snapshot of those here. Don't know for sure whether they are related to my install, but they don't seem to.