First attempt - Wordpress PHP Settings API wrapper
I've been working on what is essentially my first proper attempt at making a useful PHP wrapper class for the Wordpress Settings API. It works great so far and I plan to add more methods as I go so that I eventually build up a class that can be used in pretty much any situation.
As this is my first proper PHP class, I'm looking for suggestions of ways that I could refactor or do things more efficiently. Perhaps places where I could write code differently/use different functions to improve it. I'm not asking for a full rewrite – it's part of my learning process to do it myself.
The code is on my GitHub repo, so I'd appreciate any constructive feedback.
The class: https://github.com/glitchmunki/wordpress-settings-api-wrapper/blob/master/PBThemeOptions.class.php
Example of how the class is used; https://github.com/glitchmunki/wordpress-settings-api-wrapper/blob/master/example_options.php
Thanks in advance guys.
- 133
- 7