-
Notifications
You must be signed in to change notification settings - Fork 8
Home
David Ryan edited this page Jan 29, 2018
·
2 revisions
The Options Builder Class is a wrapper for Data APIs in WordPress.
- Panel/Page - These are WordPress Admin Pages. They contain sections.
- Sections - These are tabs on the admin pages navigated by hash and containing some sub-properties.
- Parts - These are pieces within sections, often a data field, but sometimes a simple markdown file.
- Check sure the
WPOP\\LATEST_V_NAMESPACE\\Panelclass and instantiate/queue composer autoloader if needed - Declare
use WPOP\LATEST_V_NS as Opts;at the top of your file to ease namespace access - Create your sections + parts to display on your panel (see examples).
- Create a
new Opts\Page::initialize_panel()with your configarray()and sections/partsarray(). - Run the
initialize_panel()method
By default manage_options is used. Please adjust accordingly. Per-option permissions aren't baked-in, but could be accomplished by filtering array by current_user_can().
Declaring the wrong namespace version string will definitely fatal error. This is common in development.