Skip to content

Filter for generated CSS file names #3553

@swiderski

Description

@swiderski

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

  1. global.css
  2. 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:

  1. global-85.css
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    request/enhancementIndicates an Enhancement Request for an existing feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions