Becoming a theme author in WordPress.com

I was offered 100 000 dollars and half of Automattic to become a premium theme author on WordPress.com. This was a one time deal. Take it or leave it. Hmmmm, let me think about it.

As you might have guessed this never happened, not even in my day dreams. But it was something we joked about when the process of becoming a theme author on WordPress.com started.

In The Beginning

January 13, 2014 I received email from Philip Arthur Moore where he asked have I considered selling my themes on WordPress.com? Well, that’s something I haven’t been thinking much because I thought it would be next to impossible to get my themes in there. But yes, I was interested! I felt the same as I hear AC/DC and Angus young’s guitar solo live.

But couple of weeks later Philip announced that he is leaving Automattic.

I almost over reacted and thought here goes my deal in the toilet. But thanks to Philip he forced he’s colleagues to take me under their wings. So huge huge thanks to Philip! I still don’t know why he emailed me in the first place.

Edit: Now you can email them! Apply for a theme author in WordPress.com.

The next process was pick a theme that I wanted to submit on WP.com. The choice was easy. I had just build couple of months theme called Mina olen for WordPress.org. I signed the contract and review process started.

Theme review at WordPress.com

Themes are reviewed in WordPress.org by volunteers and they are doing amazing work. Sometimes it can be bloody competition who gets the Featured themes. Also WordPress.com themes goes through very intensive review and they have even more guidelines than WP.org themes. For example these are not allowed.

  • CSS frameworks
  • Theme frameworks like Hybrid Core
  • Shortcodes, Widgets, Custom Post types and Metaboxes

I have build all my themes using Hybrid Core and Mina olen have custom metaboxes for callout text and link. So I had cleaning to do. Kirk Wight took my theme under a intensive review and taught me some new cool tricks.

Ripping Hybrid Core off

It took me couple of days to rip Hybrid Core off from Mina olen WP.com theme. At first I felt bad about it because most of my theme knowledge is from Justin Tadlock and Theme Hybrid community.

But in the end I kind of started to see my theme development in a new light. I’ve been so used of using Hybrid Core that I was spoiled. And there were things that I haven’t realize and understood completely. I left some of the functions and classes from the HC (for example breadcrumb trail script) but I liked how my theme got slimmer and I understood every line of code.

I think this might be the way I’m gonna build new themes from now on: take best parts from Hybrid Core and _s theme and combine them together. These are the arguments why I might take this direction.

  • If they let me having my themes on WP.com, I’m gonna have to work without Hybrid Core anyway. It takes too much time to have two “different” themes, one with HC and one without it.
  • Theme is slimmer. Fewer translating strings, less code to handle.
  • I can still use best parts of Hybrid Core and made decisions based on theme I’m building.
  • I feel like I have more control over theme and understand every line of code.

Other review notes

Theme review went well and there wasn’t any major issues. But Kirk is a sharp fellow and there were many things he pointed out to be fixed. I ported most of them also in WP.org version of a theme.

Escaping

Escaping the strings comes down to security. I thought I had done all but Kirk found many strings more. Here are examples.

`get_permalink()` should be `esc_url( get_permalink() ) `.

`get_the_date()` should be `esc_html( get_the_date() )`

`get_theme_mod( ‘mina_olen_footer’ )` should be `esc_textarea( get_theme_mod( ‘mina_olen_footer’ ) )`

Remove defaults

There is no need to write the defaults on WP functions. For example declaring Custom header I had these values the same as defaults.

  • default-image
  • random-default
  • header-text
  • uploads

The same goes for theme customizer. To keep code clean you can remove these defaults.

`’type’ => ‘theme_mod’` and `’capability’ => ‘edit_theme_options’`

Theme Customizer

First, all theme-specific options in the Customizer should be in one section in WP.com themes, called “Theme”. So I removed all my sections and moved them under same section.

This part of the theme review was the most educational to me. Did you know that if you want to get all the pages in Customizer you can just use Core `’type’ => ‘dropdown-pages’`, rather than your own custom function like I did. I certainly didn’t.

In Customizer `esc_url` should be replaced by `esc_url_raw` for sanitize_callback, as it’s being validated into the database, rather than for display.

For checkbox Kirk showed me really easy way to sanitaze it.

`
function mina_olen_sanitize_checkbox( $input ) {
if ( 1 == $input ) {
return 1;
} else {
return ”;
}
}
`

There were also couple of other custom sanitaze functions.

Things we get from WordPress.com

(This chapter was added March 20, 2014).

The most important part for me is that I know I have good enough skills developing WordPress Themes. And now I know I can. I had couple of questions before submitting theme to WP.com and I liked the answers.

  • Yes you can have demo site on WP.com and you can manage the content. Actually you also get sandbox demo site which is pretty cool because you can test all the toys and whistles before they go live.
  • You can set the price of a theme. You’ll get 50% and we get 50%.
  • We use SVN for sending theme files. First we use review repo, and then live repo.
  • We have themerlobby (for themers only) blog where we update all the important things happening in WP.com theming.
  • You should participate in our support forum.

I am

Mina Olen means I am and theme name was picked up from song. The singer is my all time favourite Pauli Hanhiniemi and the song is written by Juha Tapio who is listening the song. Perhaps my next theme is called You Are?

I am very proud to be theme author on WordPress.com. I am forever thankful to Philip for giving me this opportunity. I am very pleased if you need my theme on WP.org or on WP.com. I am still 99 999 dollars short for what they promised.