[wp-hackers] Theme development and hooks.
false.hopes at gmail.com
Tue Apr 5 22:54:43 GMT 2005
While I think the idea is great, the whole getting theme developers to
comply is an issue. I think it would be neat if we made it a feature of the
next major release to have a validation service as part of the admin, where
when a new theme is activated, after the first run we do a register shutdown
function or even just run the checks in WP itself after the theme is loaded
and check that the correct variables have been defined and the proper hooks
have been added, and if one is found missing, a special setting in the
database sets the theme to be unvalid, and then have the admin visibly let
the user know that the theme they're running is invalid. This way, theme
developers know that their themes aren't valid as they're developing them,
and end users will be majorly discouraged from using invalid themes.
The validator would be fairly easy to write in most aspects. The hardest
part is checking things like the comment form, which isn't there when the
index is called, and if we were to check on a comment page, the sidebar may
or may not be located there. We could have WordPress write an array of items
reqiured to validate to the database, and only write the comment value on a
comment page, and have the admin not say anything until the comment form is
marked as missing. Then, to save load, we don't update the values every time
the page is called, instead only when the values are missing. In the admin
panel there could be a button to clear the current validation settings of a
theme and have it recheck.
Just a thought... but without some measure to ensure that theme authors are
following guidelines, I don't think we'd get far at all.
On Apr 5, 2005 4:24 PM, David Chait <davebytes at comcast.net> wrote:
> Well, the value of "this" is hard to say -- as you've introduced another
> project. Yes, I think there's merit to creating 'theme templates' to build
> off of.
> But my original point is that things like plugins, that want to output
> matching the format of the current theme -- again, start with just adding
> sidebar elements -- have no way to do so. An extra set of variables or
> functions would be nice.
> The Presentation page itself could, in theory, have a 'validation' option
> that'd say whether or not certain hooks/functions/variables are defined
> MUST be for proper integration overall, plus best-of-class support for
> dropping in plugins, etc.
> ----- Original Message -----
> From: "Craig Hartel" <craig at nuclearmoose.com>
> To: <wp-hackers at lists.automattic.com>
> Sent: Tuesday, April 05, 2005 4:01 PM
> Subject: [wp-hackers] Theme development and hooks.
> > Robert Deaton wrote:
> > I think this would be a great idea, but I highly doubt that this will
> > come to be, with the huge amount of themes out there and the general
> > of cooperation from theme developers. For example, I'd bet that >60% of
> > the themes that are currently out do not have the hooks that they're
> > to include in the codex on the theme development page. There could be
> > great, easy to add things to help with cooperation between themes and
> > plugins, but in the end I would bet that none of them will fully grab
> > hold.
> > ====
> > Starting new thread :)
> > Do you think that if a cooperative project to demonstrate the value of
> > this would be beneficial?
> > What if a small group of peeps slammed their heads together to create a
> > framework of some kind? Part of the theme development issue is one of
> > maturity in terms of knowing WP and what it can do.
> > I'm currently looking for a project of some kind. I'd be willing to take
> > an existing theme and template tag the living shit out of it, with the
> > help of you folks, and create what is basically a wet dream template.
> > Is that even doable?
> > Craig.
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wp-hackers