[wp-hackers] Regarding wp markup language
Otto
otto at ottodestruct.com
Mon Apr 19 14:05:59 UTC 2010
On Sat, Apr 17, 2010 at 12:04 PM, Jeremy Clarke <jer at simianuprising.com> wrote:
> The only things that aren't dead-simple to insert into themes are the
> stuff that would be super-complicated to do even with a markup
> language, the loop itself. In my case I write wrapper functions for
> that stuff then call it in the templates, stuff like
> gv_display_post_archive() or gv_display_recent_headlines(). IMHO that
> is an area where WP has room to improve: it should offer default loop
> etc functions that can be overridden by themers in functions.php or
> plugins, similar to how the Comments system works now. I saw a trac
> ticket in this vein at some point but can't find it now.
It's slowly moving in that direction anyway. A lot of the basic stuff
is getting moved to core. Comments display got moved
(wp_list_comments) and now the comments form is there too
(comments_form). Sidebars are there in the form of widgets, sorta.
Menus are getting added in 3.0.
As long as the core keeps getting bits like this in it, then the theme
slowly becomes a way to just tie all this sort of stuff together.
The Loop is a special case though, because it is the heart of things
and therefore the most customized part of them. Consider how many
theme authors dislike the wp_list_comments function because it makes
it difficult to customize the comments html code. Consider how many
theme authors don't like widgets, or who use divs instead of proper
lists for their sidebars... Too many people have too many opinions for
there to be a single unified way of doing things properly, so anytime
something like this moves to core, it needs to be open enough to
accommodate all of those ways.
The Loop is infinitely customizable, and it often is, so it's not
going to be core-ified anytime soon. Bits of it might be. But the loop
itself needs to remain in theme for now, until a way is found to
either a) accommodate everybody's needs or b) convince everybody to do
things in a standard unified manner.
-Otto
More information about the wp-hackers
mailing list