Recent Open Source Work

I recently did some work on two open source plugins that I’d like to talk a little bit about. They’re very different, both in function and purpose, and I think that disparity gives a good glimpse into the variety of work I do in my professional life.

WP ConvertKit

If you haven’t heard of Nathan Barry by now, you should probably click on his name and go read a little bit about him. Nathan seems to really have it together, starting and growing a product business based on the concept that teaching sells. I spent a few days last year reading through his blog and bought one of his books, Authority, because I thought it was a great product.

Anyways, Nathan runs a SaaS called ConvertKit. It’s an interesting product because it recommends and guides you through a particular workflow that Nathan believes (and has somewhat proven) helps you sell digital products. I saw that there was an existing WordPress plugin for the service, but it was lacking in a few ways. Implementation details aside, I felt like there was a better solution and more “WordPress”-y way to solve the problems the plugin presented. Also, I felt like I learned so much from Nathan’s blog, it would probably be a good thing to give a little back. I took the opportunity to write a new plugin for ConvertKit, put the code on GitHub, and emailed Nathan about it.

A few months later (he’s a busy guy, so I didn’t mind) I got an email asking if the plugin I wrote could be the canonical plugin for ConvertKit and wondering if I’d add a few features. I added them and finalized the plugin a few weeks ago. I’ve heard from Nathan that it has worked pretty well so I’m happy about that. It is always nice to know that people are using the things you built.

Anyways, the final version of the plugin lives here and you can go grab it if you want to either take a look at the code or use ConvertKit and want to integrate it more easily into your WordPress site.

Multiple Rich Editors

Erik Ford, who seems to inspire open source work and blog posts on my part, posted a question on Twitter regarding the best way to add multiple editors to a custom post type:

I hate the thought of bundling or requiring a third-party plugin with your theme, especially if it includes a lot of functionality that you probably don’t need. Advanced Custom Fields is a great plugin for a lot of people, but if you’re just looking to add some WYSIWYG editors, there’s no reason to use it. I told Erik I’d look into it and get him some sample code.

The next day I worked up about 25 lines of code that you could throw into a file and you’d add an editor and save its contents for a custom post type. It was short and sweet, but it didn’t really fit with the style that I tend to build things in. Taking a cue from a previous plugin that I developed and blogged about here, I decided to make use of the theme support API that WordPress provides to allow quick and easy implementation of multiple content editors on any registered post type.

The result was a plugin I call Multiple Rich Editors. It allows a developer to specify and multiple editors per post type that should appear on the edit screen. It handles saving the data for each editor and provides template tags and guidance for outputting the information the user has entered. On top of all that, it is simple enough that Erik can drop it into his theme and save the effort of building something himself.

There are a lot of different use cases for a plugin like this. Perhaps a content type requires different sections of rich content (intro, body, conclusion, perhaps?) or you have a complex layout where a user of your theme needs a fine-grained level of control over what appears where. Regardless, if you stumble upon this and end up using the plugin I’d love to hear what you like and what you don’t and how I can make it better.

Leave a Reply

Your email address will not be published. Required fields are marked *