For those newer to the world of WordPress, you might only be casually familiar with WordPress plugins and their use. You might have only installed them and used them before but have you wondered what it would take to make your own? In this new tutorial from Toptal.com Ratko Solaja gives you a "ultimate guide" to getting started down the road of custom WordPress plugin development.
Plugins are a vital part of WordPress websites that need specific functionalities. While the official WordPress repository has more than 45,000 plugins from you to choose from, many of these plugins miss the mark.Just because a plugin is in the repository doesn’t mean it won’t hinder its performance or compromise its security. So what can you do? Well, you can build your own.
He starts with the planning stages of his example plugin (a real-world project helps when learning new things) - one that allows users to save content for later reading. He outlines the goals of the settings screen, how saving will work, messages to the user and what the "saved" screen will do. He recommends starting with a boilerplate plugin and working from there. He then goes through each step of the development process:
- Handle activation and deactivation
- Create a plugin settings page
- Create the plugin functionality
- Make the plugin modular
- Generate translation files
The end result is a complete plugin with both the required frontend and backend functionality to make the "save content" feature work. All code is provided and plenty of links to more information and other resources are sprinkled throughout the article.