[theme-reviewers] Failure of review for my theme (Ahimsa 4.0)

// ravi ravi-lists at g8o.net
Mon Mar 19 00:19:46 UTC 2012


Hello Konstantin,

that’s a great reference, thank you.


On Mar 18, 2012, at 9:10 AM, Chip Bennett wrote:
> Yes, if you absolutely *must* use file operations, then you must use the Filesystem API.
> 
> Is there any particular reason that your "skins" have to use these sort of files, rather than simply enqueueing CSS files?
> 

Let me explain my usage (which is similar to the use case #1 in Otto’s blog post) a bit. Right now, in my theme options page in the Dashboard, I let my users set colours for the backgrounds of various blocks, text colour, so on. Once I have this information, and a name for this “skin” from the user, I save them as a CSS file with that name. The CSS file contains selectors that identify the blocks as well as properties for setting their colours.

To me, the nice things about this are that more advanced users can do more complex “skins” which style more elements, more properties (such as fonts), so on, because a “skin” is ultimately just a set of CSS specs applied towards the end. Another reason I chose this approach is that once the skin CSS is generated at the server, there is no further server processing to be done, other than serving up the CSS to each visitor.

The latter is one reason (though not the only one) I did not implement my colour settings as DB options, that I read each time, process, and spit out corresponding CSS. I could save the entire CSS as a blob in the options, perhaps, but that’s not very good use of the DB (I think Joseph Scott disagreed with me on this; perhaps he is right). 

On the other hand, the file ownership issues raised by Otto in his blog post are very valid and serious concerns.

	—ravi



More information about the theme-reviewers mailing list