> having a CSS text field in the plugin options and adding them to the head by overriding the head_css seems the best way
Actually, I'm kind of against of adding CSS through text fields. This is because:
1. Code is getting mixed with data (OK, this is not a strong argument, I know, but I'd prefer to keep things separate)
2. Related to the previous item, if I see there is an issue in how something is displayed, now it is not enough for me to look at the code but also I will need to review the options (of each plugin)
3. In order to take advantage of an editor I would have to copy/paste the text to another more specialized editor (OK, this not a big deal, and probably it is even faster than uploading a file via FTP)
4. You save one row per plugin in the invaluable ^options table. This not only (minimally) increases performance but also reduces memory usage as the CSS doesn't have to be read into the ^options array in each request
5. You are not limited by the size of the content field of the ^options table which I believe has an 8k character limit just because of the CSS files
Most of the arguments are arguable or minor. Still, I couldn't find really strong arguments in favor of using the text field rather than saving time by not uploading files through FTP.
> I added an option whether to output the CSS at all
That's an interesting approach. A couple of years ago I thought on the 2.0 version of that approach :) Here goes the overcomplicated approach:
* Creating a Performance module (or whatever you want to call it) that will have a single method that returns plain CSS or CSS file references.
* The core would have a setting to merge CSS into one file (needing write access on the server, sadly)
* Each plugin developer would register the CSS that can be merged by implementing the needed methods of the Performance module
* The core will, in an on-demand basis (or when a plugin is enabled/disabled), re-merge all CSS if the setting is enabled
* Plugins will have to check if the setting is enabled to decide if they output CSS or not
* This could apply to JS as well. Or even taken a (long) step further with sprite images.
> commented 3 hours ago by Scott
Nice to see you again :)