• Resolved anonymized-14293447

    (@anonymized-14293447)


    Dear Support, I’m enquiring about the CSS files that are sitting in wp-content directory (combined-min, custom, custom-min). It’s a bit annoying to have plugin files outside their normal folders, so can’t this be avoided? Can they be moved elsewhere? Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This is correct and expected, and the wp-content folder is a suitable place for this. Storing these files in the plugin folder will not work, as they contain user-generated content, which would then be lost after a plugin update.
    Note that you can change the folder and URL via a plugin filter hook.

    Regards,
    Tobias

    Thread Starter anonymized-14293447

    (@anonymized-14293447)

    Thanks for clarifying that. Are you saying they could be moved to wp-content/uploads/custom-folder, where all other plugins store user-submitted files?
    I wouldn’t know how to setup a hook, though, I’m not a dev ??

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    in principle, yes. I essentially decided against this as it would require that a new folder “tablepress” is created. This can sometimes fail on certain server configurations, due to access rights issues. However, creating new files usually works fine, as the “wp-content” folder always exists already.
    The relevant filter hook definitions are https://github.com/TobiasBg/TablePress/blob/master/classes/class-css.php#L147 and https://github.com/TobiasBg/TablePress/blob/master/classes/class-css.php#L161
    Now, can you maybe clarify why it’s a problem that the files are in “wp-content”. Due to their names, it’s pretty clear where they are coming from, right?

    Regards,
    Tobias

    Thread Starter anonymized-14293447

    (@anonymized-14293447)

    ?? surely I’m gonna leave things as they are, as playing with those hooks can lead to disaster for me (not being a dev).
    The files were just bothering me for a “visual” reason. Sometimes you can spot weird files or hacks just by looking at the directory, can’t you? Having those files where normally only folders are found is just a little uncomfortable. Of course I’m the Admin and will remember not to delete them but one never knows…

    Thank you

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ok, I see. Yes, one can sometimes spot hacks via this method, but I would then actually suggest to use a version control system like git for the, as you will then be able to spot this even easier ??
    And no worries about accidentally deleting the files: The “master copy” of this data is actually in the database, and saving the “Custom CSS” on the “Plugin Options” screen would then re-create the files.

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘files in wp-content directory’ is closed to new replies.