-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Filter for generated CSS file names #3553
Description
I have mulitisite installation, with unified upload directory – it means files from all sites land in one place, not in per site directory. It is done so we save lot of space with our demo data. No matter.
Now Elementor is creating 2 types CSS files
- global.css
- post-10834.css(1 for each post)
However cause my multisite is using same upload directory these files are overwriting each other on different sites.
I managed to solve this(by editing plugin code) by adding blog id to file names that are generated per post and to global.css, so they look now like this:
- global-85.css
- post-85-10834.css
Now I have question:
Could you add filters to Post_CSS_File::get_file_name() & Global_CSS_File::get_name() ? I know this is not standard situation, but thanks to it I wouldn’t have to edit plugin every time to make it work with my setup for demo sites.
Maybe you have other proposition what I could “filter” to achieve similar effect of unique file names?
I looked for way to overwrite this without editing plugin, but there are no such filters that would suit this situation.
I could change file name of embeded CSS files on elementor/global-css-file/enqueue & elementor/post-css-file/enqueue` actions, but still there is problem with file names "on save".
With kind regards.
Air.