The guys over at nettuts+ put together a great tutorial on creating a WordPress plugin with OOP techniques.
Object-oriented code, among other things, can help organize and add reusability to your code. In this tutorial, I will teach you the basics of writing a WordPress plugin using object oriented techniques. We’ll be using Dribbble’s API as an example for this tutorial.
It’s about a 30-min tutorial and considered “intermediate” as difficulty goes. There are a lot of good concepts explained.
You’ll learn the benefits of using OOP for WordPress plugins, setup shortcode, setup template tags, enable shortcodes in your WordPress widgets, as well as a real-world example using Dribble’s API.
These are the steps they’ll guide you through:
- Setting up the Plugin Class
- Dribble API Class
- Integrating the DribbleAPI Class
- Setting up the Shortcode
- Setting up the Template Tag
If you can get a handle on these concepts, the range of what you can do with WordPress will really expand.
Ready? Set? Go!
[via nettuts+]
Tom says
Highly recommend this for anyone looking to get into major WP plugin development :).
Eric Dye says
Obey Tom.