For me one of the advantages of growing older is that I become more honest with myself. I’d like to think I’d be the kind of person who would dash off a quick WordPress plugin, but in fact I’m a writer, not a coder.
That said, I recently received a free ebook copy of WordPress Plugin Development: Beginner’s Guide, by Vladimir Prelovac.
This book is for programmers working with WordPress, who want to develop custom plugins and to hack the code base. You need to be familiar with the basics of WordPress and PHP programming and believe that code is poetry; this book will handle the rest.
After the first few chapters I didn’t read it closely. I realised in the middle of creating the first plugin that I may refer to the book if I ever do decide to create or edit a plugin. I wasn’t about to begin a long glorious career of making plugins though.
This is a Packt Beginners Guide, which means it focuses on practical examples and has a fast-paced but friendly approach, with the opportunity to learn by experimentation and play. Each chapter builds a practical plugin from the ground up using step-by-step instructions. Individual sections show you how to code some functionality into your plugin and follow up with a discussion of concepts.
It was full of practical examples, with the code examples also available as a separate file download. Prelovac steps readers through making half a dozen plugins, each more sophisticated than the one before. He gives you the code, and then clearly explains what was going on with the code.
Prelovac then provides some thought-provoking exercises to help you develop that code further, and a useful summary of elements of the code — the building blocks you’ll need once you go on to develop plugins of your very own.
As a trainer and writer I could see that the difficulty and complexity of the plugins followed a nice progression through the book, and gradually took you into all the deep nooks and crevices of WordPress.
The book is thorough, extensive and clear. It contains useful code examples and the reasoning that explains how and why things work as they do. It shows you how to develop some very specific, useful plugins, while also giving you the tools to go off and do your own thing. A reference section points you to relevant mailing lists, podcasts and websites.
Sadly, I don’t think I’ll ever be someone who delves deep in the working of WordPress, who develops a plugin or widget at the drop of a hat, or who creates cunning PHP to do amazing things. If you are that kind of person, then take a look at this book: it could get you off to a good start.
One caveat: I know (only) a smidgeon about PHP, and I don’t always follow instructions to the letter. While creating the first plugin I managed to cause WordPress to throw some ‘headers already sent’ errors. I’ve encountered these before so had an inkling of where to start troubleshooting.
The book didn’t seem to deal with the things that may go wrong while creating and using the plugins. I suggest that you really do need to have a decent grasp of PHP if you want to make the most of Prelovac’s instructions.