Search

Hugh Lashbrooke

WordPress / WooThemes / Automattic

Community is to WordPress as Bacon is to Breakfast

Yesterday afternoon I presented a session on WPSessions that was all about the WordPress community and how we can all engage with it in a more meaningful way. The session went very well and I had loads of fun doing it – a big thanks to Brian Richards for inviting me to speak!

You can watch the session for free right here – it’s a little less than an hour long in total.

I won’t spoil the content for you, but think of this session as a motivational talk that will inspire you to get involved in the WordPress project in a way that is not only relevant to you, but impactful on the broader community. I can’t stress the importance of meaningful community engagement enough, so have a watch of the video and feel free to leave a comment on here.

Getting Started With WordPress Development

Last night I spoke at a meetup of the Cape Town PHP Group. I was speaking alongside the excellent Gareth McCumskey who was giving a run down of what we can expect in PHP 7 (we can expect a lot of awesomeness by the way – you should really check that out).

My presentation for the evening was a primer on WordPress development and a guide on how to bend WordPress to your will (which would have made a way more awesome title for the talk).

The vast majority of the 30 attendees at the meetup were advanced PHP developers who had minimal experience with WordPress development – this gave me a nice opening where I could talk about some of the basics of writing code for WordPress without having to start with the basics of PHP first. It was also relatively intimidating knowing that most of the people in the room were probably more experienced and more qualified developers than myself, but I think I held my own well enough.

My talk was well received and I think I went on for quite a bit longer than I was supposed to, but that was mainly due to so many questions being asked. It was very encouraging to see that there is clearly a significant interest in WordPress development inside the PHP community.

The video and slides for my talk are below, along with a list of useful links that I either mentioned or feature in my slides at some point.

Useful links:

WordPress plugin developer info
All the information you need in order to get your plugin on the WordPress plugin repository.
WordPress coding standards
WordPress has defined coding standards for PHP, Javascript, HTML and CSS.
WordPress Action Reference
An ordered list of (almost) all of the action hooks available in WordPress core.
WordPress Filter Reference
A list of (almost) all of the filters available in WordPress core.
My WordPress plugin template
A plugin template I developed for my own use that helps get a new plugin off the ground with very little effort.
Varying Vagrant Vagrants (VVV)
Varying Vagrant Vagrants is an evolving Vagrant configuration focused on WordPress development.

Whether you were at the meetup or not I would encourage you to dive head first into WordPress development and I’ll happily lend a hand where I can, so get in touch with me in the comments!

Starting a New Chapter

Today is not only my 3 year anniversary of joining WooThemes, but it also marks the first day that I am no longer a full-time developer on the team. This kicks off a significant new chapter in my professional career as it will be the first time since I started working that my job will no longer be 100% focussed on writing software.

My new title at WooThemes is Community Engagement Manager, but titles don’t mean all that much in the WordPress community these days so let me explain that a bit further. I essentially created this position for myself because I saw a need at WooThemes that I wanted to fill.

What is it?

The Community Engagement Manager position exists to manage WooThemes’ relationship with the WordPress community. It will involve engaging with other companies and individuals in the community as well getting involved in practical ways – from events and sponsorships to core contributions, plugin development and engaging in discussions. On top of that, a big part of this position is ensuring that our whole team gets involved in the broader WordPress community on an individual level.

Why does WooThemes need it?

I believe it is incredibly important for WooThemes, as a company, to be more heavily involved in the WordPress community than we are currently. Matt Mullenweg also thinks so and, while this isn’t a quest to tick a box or fill a quota, the principle behind his 5% is to be giving back to the community in a dedicated and intentional manner – this position fills that need at WooThemes.

Why me?

I completely believe in the community and I’ve benefitted so much from it already that giving back in an intentional and direct manner is something that I am totally passionate about. I love what the WordPress community is and what it represents – being the Community Engagement Manager will allow me to tie my work at WooThemes together with my passion for the WordPress community.

What will I be doing?

Seeing as though this is a brand new position at WooThemes, we’ll be figuring a lot of it out as we go, but the overall goal of the position is to move WooThemes to the forefront of WordPress contributions and the community. This will come in the form of active contributions on my part as well as working with each member of our team to get them all to a point where they are actively contributing on a regular basis. I’ll also be working towards getting WooThemes directly involved in community projects (such as CommHub and HelpHub).


I’m very excited for this position – not only because I now get to devote 100% of my time to improving the WordPress community, but also because it will enable WooThemes to become far more effective and present in the global WordPress community.

As a side note, this move is nicely complemented by Bryce Adams moving into a full time development role at WooThemes.

Software development never changes

In the early ’80s, my father trained countless Cobol programmers. A mantra that he always repeated to every single one of his students was this:

A good programmer focuses on getting the code right, while a great programmer focuses on what the users have asked for.

That was over 30 years ago. Around the time BASIC was invented – before C++, Turbo Pascal or Perl even existed and long before PHP, Python, Ruby, Javascript or any language that we actually use today had even been conceptualised.

Jump ahead to 2015.

This week I was interviewed on the WisdmLabs blog about my WordPress development practices. They asked me: What is the difference between a good developer and a great developer?

The answer was fairly obvious to me, not because my father had told me (I never knew he even had that mantra), but because this is just the way I have always viewed things:

A good developer focuses on code, while a great developer focuses on users.

So what’s changed in 30 years of software development?

Nothing.

Sure, we have new technologies available to make things easier – simpler languages, more convenient libraries, new coding standards and more efficient IDEs. But none of that will ever change what the main focus of any software development should always be: users.

If users aren’t at the centre of your development then you’re already doing it wrong.


I should probably point out that the guy in the photo at the top is not my dad – that’s Ken Bowler, a systems programmer from the University of British Columbia circa 1980.

WordPress: Check if user role exists

As part of a recent Sensei update we added some custom capabilities to the editor role, but we discovered that some people have deleted that role from the database as a way of cleaning up unused data on their sites. This meant that our add_cap() calls were causing fatal errors for these sites.

While that is admittedly a fringe case, it’s useful to know how to check if a role exists in the database before you go about manipulating it. It’s actually really easy to do, but WordPress doesn’t have a handy role_exists() function or something similar, so it requires a small amount of custom coding.

Here’s how we added a function like this and solved the problem for ourselves along with the basic usage:

Building a simple & beautiful documentation site

With Seriously Simple Podcasting crossing 35,000 downloads and v1.8 of the plugin being released recently it was high time that I put together complete documentation for it. After spending some time building the site that you can now find on my new docs subdomain I thought it would be valuable to share the tools I used for posterity. So here you will find the theme and plugins that I used to get my docs site up and running.

Theme

As with any custom design I embark on, I used Canvas by WooThemes as my parent theme. I’m not much of a designer, so I find Canvas to be a great substitute for my lacking design skills. The design and typography options do wonders to make someone like me look like they know what they’re doing with design work.

For my typography I went with Ubuntu for the headings, Open Sans for the body text and Droid Sans Mono for the inline code.

Seriously Simple Podcasting Docs Homepage So, with Canvas as the parent theme, I built a custom child theme to cater for my needs. You can download that child theme from here if you like (it includes the theme settings export file), but it obviously contains a number of customisations that would be unique to my site. It also requires the plugins I used to make this site a reality.

Plugins

With the theme taken care of I could now look the plugins I needed.

Docu

To start off with I looked around for a decent documentation plugin and, having found nothing workable, I was about to start writing my own one when Emili Castells got in touch with me about his new plugin, Docu. Docu is a simple and flexible documentation plugin that doesn’t add any extra bloat or overhead to your site. It comes with a new custom post type and taxonomy for creating and categorising your docs as well as nicely designed templates (that you can override from your theme) to help you display your docs easily.

I added a small amount of custom styling and logic to the display, but other than that Docu effectively works very well right out the box.

Table of Contents Plus

A necessary feature for any docs site is a table of contents on each document. For me, the best table of contents plugin I’ve ever used is Table of Content Plus. It gives you a number of options for how to display your document contents, but all-in-all it’s a very easy plugin to use that requires only minor configuration to get working.

Screen Shot 2015-02-10 at 10.14.37

oEmbed Gist

As this is a documentation site that includes developer docs, it’s necessary to show code snippets from time to time. One of the best ways to do this is to store your snippets on GitHub’s Gist as it makes them public and easily discoverable. The next step is to embed them in your site content, which unfortunately WordPress doesn’t natively support. Enter oEmbed Gist – just install the plugin and pasting your Gist URL into your content will generate a neat oEmbed of the code.

Pro tip: I use GistBox to create and manage my Gists – it has a great UI and makes team collaboration much easier.

Relevanssi

WordPress’ built-in search has always been mediocre at best and there are a lot of plugins out there that are built to enhance the search experience in WordPress. My favourite of these plugin is Relevanssi – with a few simple options you can boost your site’s search effectiveness by leaps and bounds. This is incredibly important when working with documentation as the search is often the first port of call for many users.

An added bonus with Relevanssi is that it allows you to track your user’s searches so you can see what search terms are the most common.

Testimonials by WooThemes

There are loads of plugins available for adding testimonials to your site, but my favourite is definitely Testimonials by WooThemes – it’s especially useful if you’re using a WooThemes theme as it integrates smoothly with the design of your site. The content for the testimonials is all copied from the plugin reviews on the repo.

Screen Shot 2015-02-10 at 11.14.17

Acknowledge Me

The final plugin I used is the handy Acknowledge Me plugin by the guys behind the Pods Framework. Because Seriously Simple Podcasting is an open-source plugin that has had a couple of different contributors help to make it more awesome, I thought it would be good to acknowledge them on the docs site. Acknowledge Me displays all of the contributors to a GitHub project in a neat grid with avatars and contribution counts – all I needed to do was some minor CSS changes to have it fit into the design of my site more effectively.

Screen Shot 2015-02-10 at 10.17.41


And that’s all there is to it. All of those plugins are freely available from the WordPress plugin repo so getting all the functionality you need for a docs site won’t cost you a cent and, while the theme isn’t free, it’s well worth getting a Canvas licence for all of your custom design needs.

Plugin Dashboard: Making plugin management easy

Once you have more than a couple of plugins in the WordPress plugin repository, it can become rather cumbersome to manage them all effectively. This problem is particularly accentuated when a new version of WordPress is released and it becomes a chore just to keep tabs on which WordPress version your plugins all support. At least that’s what happened to me when WordPress 4.1 was release recently.

The plugin list on your WordPress.org profile shows the names and icons of all your plugins, but to do anything further you need to open up each plugin individually and go through them from there.

Enter Plugin Dashboard…

This is why I created Plugin Dashboard.

Plugin Dashboard brings all of your WordPress plugins together in one place so you can see all of the relevant details as well as easily access your support forums, SVN repos, etc.

Plugin Dashboard - Home

All you need to do is fill in your WordPress.org username and hit enter. After that you can simply bookmark your dashboard (plugindashboard.co/username) and check it for the latest details anytime you like.

Individual plugin cards look like this:

Screen Shot 2015-01-27 at 15.04.31

So go ahead and start using the dashboard today – it’s easy to use and will help you keep track of all your plugins in one handy location.

Build user appreciation links into your plugin

The other day I posted about showing plugin developers appreciation and how it’s actually really easy to do. The problem, as was pointed out to me, is that writing reviews, donations, etc. are all only accessible from the plugin page on the repo and there’s no quick way to get there from the WordPress dashboard.

All is not lost, however! It is possible to add custom links to the plugin list table alongside the default links that point to the author’s website and the plugin details page. By default those links will look something like this:

We're looking to the right of the version number.
We’re looking to the right of the version number.

That’s all well and good, but there’s a simple filter that allows you to add any additional links (or markup) to that section that you wish: plugin_row_meta.

So, in light of my previous post, I thought it would be handy to provide a snippet that allows you to easily add these links into your plugin. This snippet will work for any plugin that is hosted on the official plugin repo. The only items that you will need to change are the $plugin_slug and $donate_link variables along with the text-domain string – everything else is pulled dynamically from the plugin information that WordPress provides:

Once you have added (and customised) this snippet, the plugin record will now look like this:

We’re still looking to the right of the version number.
We’re still looking to the right of the version number. Nifty.

Developers are people too!

Believe it or not, people who develop WordPress plugins are actual real live people with actual real lives and actual real feelings.

If you prick us, do we not bleed? If you tickle us, do we not laugh?

When we release a plugin on the repo we don’t do it out of need or obligation – rather it’s out of passion and a desire to give back to the great community that enables us to earn a respectable living.[1. I use the word ‘respectable’ here on purpose as I am referring to those of us with real jobs and not the leeches who exploit the GPL by reselling (and often rebranding) the hard work of other developers.] We do it because we believe that being selfish with our code doesn’t benefit anyone and by making it available for the world to use we are adding to the overall value of WordPress as a platform and as a community.

So if all that’s true, how can we show appreciation for developers who have spent hours of their time writing code from which they will never directly profit? Well the plugin repo provides a few very easy ways to do this:

1. Write a review

Leaving a review for a plugin is incredibly easy and will only take you a minute of your time. It’s really easy to do and it’s the best way to give more detailed feedback to the plugin developer. Along with a star rating you can leave a review detailing why you rated the plugin how you did and what you think of it all. Plugin reviews are criminally underused, especially now that all star ratings require a review to be written as well.

2. Vote for compatibility

Another surprisingly underused feature is the compatibility voting. On every WordPress plugin you can indicate whether the current version of the plugin works with the current version of WordPress. The has two significant benefits for the plugin – firstly, it displays a friendly green box on the plugin page that states very clearly that the plugin works with the latest version of WordPress and, secondly, when someone searches for a plugin from inside their WordPress dashboard it indicates that the plugin is 100% compatible with their current WordPress version. If only the creator of the plugin has voted for their compatibility then the 100% notice will qualify the ‘working’ status with a tagline saying ‘according to its author’, which makes it seem a lot less valid than otherwise.

Screen Shot 2015-01-19 at 14.38.57

It doesn't even take that many votes to get the green label.
It doesn’t even take that many votes to get the green label!

 3. Donate to the developer

All plugin developers have the option of including a donation link with their plugins that will be added to the plugin page on the repo. While this is the only method shown here that will actually cost you money, it’s a great way to show your appreciation while also supporting the livelihood of the developer. I’ve only ever received a few donations through my plugins, but every time I do I feel hugely encouraged.

4. Spread the word

The final way of showing your appreciation that I’m going to mention here is pretty basic really and is probably the most natural and organic way of helping to support plugin developers – simply tell others about the plugin. Head to Twitter, Facebook and your other networks and tell others how much you enjoy the plugin. Given that this is something you would probably do anyway it’s pretty easy to be more intentional about doing it.


So what are you waiting for – go through your plugin list today and show the developers what their work means to you.

Blog at WordPress.com. | The Baskerville Theme.

Up ↑

Follow

Get every new post delivered to your Inbox.

Join 1,188 other followers