Checking Out Twenty Ten
[Obligatory comment about my lack of posts and my intentions to be better in the future]
I’ve been following the development of WordPress 3.0 more closely than previous versions, and one of the features that has intrigued me the most is the new theme being developed. Twenty Ten is shaping up to be an elegant and innovative theme and I’m excited to see what it becomes before the final release of WordPress 3.0.
One of the nifty WordPress 3.0 features Twenty Ten takes advantage of is the new API for choosing a header and background image. In previous WordPress versions, theme authors would have to include complicated forms and form handlers if they wanted to allow their theme’s header and background to be customized. Now the theme simply has to indicate to WordPress that it supports custom headers and/or backgrounds and mention any images that are included in the theme. WordPress takes care of the rest, allowing administrators to choose between the available images or even upload an image of their own. Not only does Twenty Ten utilize this API, but it includes eight (so far) beautiful images to choose from.
The really nifty thing about having this standard API for custom headers/backgrounds is that it’s easy to customize. For example, I was able to write a plugin that randomly chooses between the available headers using a standard (to WP 3.0) filter. What’s neat is that this plugin should work with any theme that uses the new API and includes custom headers (though it’s hard to test since no other themes support currently do).
If you haven’t seen what Twenty Ten looks like, you can find my own instance here. I have the custom header plugin installed, so if you refresh the page the header image should change.
And that’s about it. If you want to check out my random header plugin, it has its own plugin page.
I guess the header upload feature in WordPress 3.0 is somewhat neat, but I think it is unfortunate that it was given priority over some other features or bugs that could have used more attention. For MOST people on WordPress, choosing a header image is something that is done once and never thought about again.
Of course, thus is the nature of open source software. I’m just surprised this was committed into core given all the other changes happening.
I agree that this feature doesn’t need to be really high priority, but I’m not aware of any major bugs or features that aren’t being addressed. Which ones are you referring to?
Excellent to hear! I will be checking out your plugin. I Googled looking for this exact thing. Something that will randomly choose from a batch of header images.
The only question I have is, I wish Twenty Ten would let me upload a bunch of images to choose from, randomly or otherwise, instead of only allowing me to use at a time, discarding one to get another.
Thus I would be willing to accept (am looking for) something that will look into a folder I specify, and make a list of all the files there, and use them.
If I am reading your post correctly, it can only choose from those few header images that come standard (as being registered by the theme — in this case, those few that come “out of the box” with Twenty Ten).
Can you help me understand if I am reading you right? And if so, do you have any plans for doing something like what I mentioned?
Check out the “Dynamic Headers” plugin. It has a lot of neat features. It does not make use of 3.0′s new API, etc, like you’re talking about, but it does find all the images in the given folder, and it lets you assign attributes to each image, such as ALT tag, URL for A tag, target window for A tag, etc.
What might be neat is to have the ability to create something like a page or post (perhaps hidden) called, say, header images, and then use the new “header image upload tool” like a “media uploader” to get images to be in the “gallery” of that page (attached to it), and have some header theme options or plugin options to hit that list for choosing a header image.
Well, this plugin was honestly little more than an opportunity to mess around with 2010 and some of the new WordPress 3.0 API’s, so I probably won’t add many new features (if any), but it probably wouldn’t be hard to do what you’re suggesting.