Last week, everyone at Automattic got together for our “Grand Meetup.” This is the only occasion each year that all 600+ of us are together in one place. With such a large group, there are many different things going on: meetings, projects, bonding activities, support rotations, and savoring amazing pastries.
While there, we also have the opportunity to take classes taught by our coworkers. The classes focus on a range of topics: writing, security, coding, design, and public speaking to name a few. I’ve taken a handful of classes though the years, and they’ve always been spectacular. We have a massive wealth of talent and knowledge here at Automattic, and I love having the opportunity to learn from my colleagues directly.
This year, I took a class on building a WordPress plugin. The class was taught by Jennifer Dodd, one of our fantasic Code Wranglers. My development skills are self-taught (I picked up PHP as a hobby while I was in high school, and then mostly abandoned it for years), so I always love the opportunity to learn from someone who clearly knows what they’re doing. 🙂 Nowadays, I write a fair amount of PHP while designing and maintaining WordPress themes for WordPress.com and Longreads, but before the class, I’d never really explored how to make a WordPress plugin.
Over the first couple days, Jennifer introduced us to some PHP and WordPress best practices, and explained how, when, and why they should be used. From there, each of us came up with an idea for a plugin, and built it ourselves. We shared code in progress, and weighed in on ways to improve it.
For my plugin, I built a version of the WordPress.com footer we use on Longreads:
I wanted this to essentially be a replacement for the standard “Powered by WordPress” (or some variation thereof) footer that you see at the bottom of many WordPress sites by default. This new footer would be a bit more prominent, and would hook into the WordPress.com Affiliate Program. It’d be a way for self-hosted WordPress sites to easily add a referral link to the bottom of their site (as well as a way to show their WordPress pride).
One PHP class, 19 functions, and 108 lines of (generously-spaced and annotated) CSS later, I had it all up and running:
The plugin is fairly simple overall — it adds a little template snippet to the bottom of every page on your site, and it allows you to customize some basic settings behind the scenes. I’m not sure it’ll ever be put to use in production, but the process of building it in an in-person, supportive, collaborative environment was outstanding. The classes encourage us all to expand our skills, and to actively help each other while doing so.
At Automattic, we often talk about the importance of our company creed. I find that these Grand Meetup classes directly embody the following few lines from that document:
I will never stop learning… I will never pass up an opportunity to help out a colleague, and I’ll remember the days before I knew everything.
One last thing to note: As with most of the work we do here, the plugin I wrote is open source. As far as plugins go, it’s fairly simple, but hopefully it can serve as a starting point for someone else to build something new as well.
Travis from affiliates will thank you if that gets released. 🙂
Any chance of Customizer integration? 😆
I considered writing this as a custom widget actually, for that very reason! I already knew how to write custom widgets though, so I ended up building it this way to learn something new. 😄
I wonder if we could hook it into the footer credit functionality in Site Identity for Jetpack folks?
Definitely — seems like a great opportunity, and a natural fit.
Let me know if there is anything I can help you with on this project. Such a great idea. I would love to see it in production!