[wp-hackers] Theme structure
Alan Baljeu
alanbaljeu at yahoo.com
Wed Jun 11 17:19:58 GMT 2008
I'm working on building an interactive theme editor. The idea is that the editor would enable definition of various layouts, and support styling. The goal is to enable relative novices to design their own theme, then if they find cool stuff somewhere and put it in with a text editor, then the theme editor will still be able to work with the modified files. Obviously, not every change can be accommodated, but I'm thinking to cover certain "normal" changes.
At this point, I'm just working out the concept.
First though, I want to understand better the structure and conventions of a theme. Obviously, WP generates HTML files using PHP, but in general people could do all kinds of wacky things in PHP. I was wondering if there are solid standards about how a page comes together. For example, are functions usually expected to create balanced HTML, or is it common to produce unbalanced code that must be closed off by another function? For example, get_header() generates HTML which is incomplete without calling get_footer(). In cases like this, I could just pair off the two elements, and allow arbitrary stuff to be added between..
How much can a not-totally-stupid editor attempt to understand the structure of a document? What are the gotchas to watch out for?
__________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!
http://www.flickr.com/gift/
More information about the wp-hackers
mailing list