Redesigned

redesigned.png

Felt an urge to redecorate the other day, and so I threw some new paint on this old thing. I trimmed a lot of fat, went all HTML5, completely ignored Internet Explorer, threw in a Google web-font and made the site all responsive and scaling to smartphones. It was liberating. If you’re reading this in a feed-reader, I invite you to jump out of it for a brief gander.

For a while I’ve been working on the be-all end-all WordPress theme, a parent theme framework with all sorts of other buzzwords not including synergy. For this theme, however, I simply threw it all out and started with a mix of TwentyEleven (excellent HTML5 base) and the deprecated fallback theme you’re not actually supposed to use (turns out the fallback comments form was much to my liking; don’t worry, I copied the files to my theme directory).

I also deactivated a bunch of plugins. I’ve been a tremendous fan of Subscribe To Comments ever since I switched from Movable Type almost a decade ago (how time flies), but since the introduction of email subscriptions in Jetpack, that plugin is more-so a must-have for me (not to mention the fact that the stats module is now some of my bread and a lot of my butter). I have a bunch of to-do’s still, mostly related to finding a decent way to make my photos section interesting again.

Then of course, I’ve turned down the lights, something you either love or hate. I’ve found myself reading a lot on my smartphone, and somehow it works for me when the little device emits less light in my face. Black will do that to you, and I’m told it’s always a good choice. Plus, I’m a big fan of feed-readers (not so much Google Reader anymore), so if you prefer a white background you may go right back to your reader of choice and I will harbor no ill will towards you.

Part of my urge to redesign has been my want of going long-form. This blog has gone through a lot of iterations based on my whim at the time. Currently, this quote by Brent Simmons appeals to me:

Twitter and Facebook are great for organizing a revolution. Blogs are for explaining why we need one.

I’m not looking to start a revolution, and the truth is I may blog way less these days now that I’m juggling a toddler and a fantastic job. But what I do write, I want to keep, store, cross-reference and archive.

Cleanup HTML WordPress plugin

screenshot-1.png

Cleanup HTML is a new WordPress plugin. All it does is add a button to your visual editor. This button, when clicked, strips your post HTML of any div or span tags you might have, usually (but not always) junk tags to have in a post. The plugin relies on core TinyMCE features so it’s really nothing special, but it might come in handy once in a while. Let me know if you find it handy enough to expand its cleaning capabilities and/or submit it to the official repository.

Download Cleanup HTML 1.0 for WordPress

Update: The core functionality is a snippet of JavaScript. Here it is as a bookmarklet, which only works when you’ve selected the visual editor tab.

Drag this link to your bookmarks bar → Remove divs and spans from visual editor

The BBPress plugin is here

BBPress used to be a fork of WordPress that provided users with pretty good free forum software. The downside? It was a lot of work to skin and it was fairly tricky to update the software. Those last two things are way easier now that BBPress has been converted into a WordPress plugin, and you can download the beta today. The BBPress plugin adds admin menus to your WordPress as well as page templates and shortcodes that allow you to set up forums from within the admin. It’s glorious.

Put a Jetpack on your WordPress

large_jetpack.png

Exciting times at Automattic. We’ve just launched Jetpack, a brand new plugin for your WordPress blog. It brings you features that were previously WordPress.com only. A lot of features, actually — you should visit jetpack.me to find out all the nitty gritty details — but my favourite features are these:

  • All new, iPad friendly WordPress.com Stats
  • Some unannounced upcoming features!

I’m so completely proud to have played a part in the team-effort design of the Jetpack experience. We really, really hope you like it.

Overhauled WordPress.com Stats

It’s something I’m completely proud to have been working on for the past few weeks (along with the incredible Automattic team!): WordPress.com has a new overhauled stats page. This first round of the overhaul brings sortable dashboard-esque boxes to the stats page, and a revamped non-Flash, iPad compatible histogram bar chart.

On the whole, the community seems to like the new look, but a number of people miss the old line-chart and a few others find the new design boxy and uninspired. Which is their prerogative and I won’t spend too much time defending it, other than say that a lot of thought been poured into the revamp, and personally I think and hope it’ll grow on people. As for histogram charts, there are a lot of good, semantic, reasons for going with them. But my personal favourite is the large hit area each bar provides, for when you want to look at individual day stats. Penny for your thoughts?

WordPress Trick: Remove Dashboard Widgets

Want to remove some dashboard widgets programmatically? Perhaps to hide useless cruft from every role but the Administrator? Dump this in your themes functions.php:

function remove_dashboard_widgets() {

	global $wp_meta_boxes;

	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);

	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);

	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);

	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);

}

if (!current_user_can('manage_options')) {
	add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );
}

This removes all dashboard widgets, so you’ll probably want to poke around and comment out some of these array unsets.

WordPress Trick: Hide Admin Panels From Specific User Roles

When you’re building a WordPress website for a client, sometimes you’ll want to hide certain admin panels from specific user roles; do editors really need “custom fields”? Drop the following code into your functions.php file to hide the Custom Fields meta-box from editors.

function hide_meta_boxes() {
     remove_meta_box('postcustom','post','normal');
     remove_meta_box('postcustom','page','normal');
}

if (!current_user_can('manage_options')) {
	add_action('admin_init','hide_meta_boxes');
}

The remove_meta_box function takes three parameters. 1: the div ID of the box you want to hide, the context (post or page) and position (normal or advanced).

WordPress Trick: Google MP3 Player Shortcode

Here’s another WordPress shortcode which is quite useful. It piggybacks on Googles excellent Flash-based MP3 player (the one they use in Gmail and so on), makes it easy to embed playable MP3s in your posts. Syntax: [raw][mp3=path/to/filename.mp3][/raw]. Dump this in your functions.php:

function mp3player($attr) {
	$src = str_replace("=", "", $attr[0]);
	return '';
}
add_shortcode('mp3', 'mp3player');

Here’s an example:

[mp3=http://www.speakerbiteme.com/tracks/teach_me_tiger.mp3]

Music by Speaker Bite Me.