/WordPress-Plugin-Settings-API-Template

Handy Template Class for creating option pages with the WordPress Settings API.

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

WordPress-Plugin-Settings-API-Template

Handy Template Class for creating tabbed navigation option pages with the WordPress Settings API.

About

WordPress Settings API is a... little dark hole, you can easily spend hours to setup a bunch of fields. This PHP Class let you create an option page by mostly tweaking a simple Array. It does support tabbed navigation.

Screenshot

Option Panel 1

Option Panel 2

Credits

This is largely based on this gist by @hlashbrooke. There are a few differences:

  • All options are saved in a single array
  • There's a getter method for the options
  • Accepts Plugin Name and Plugin Slug as parameters
  • No external assets required as there are no Image Upload and Color Picker fields (Sorry, but I don't need them most of the time)