You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
David Ryan edited this page Jan 29, 2018
·
2 revisions
The Options Builder Class is a wrapper for Data APIs in WordPress.
Vocabulary/Terms Used:
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.
Getting Started
Check sure the WPOP\\LATEST_V_NAMESPACE\\Panel class 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 config array() and sections/parts array().
Run the initialize_panel() method
Frequently Asked Questions
How do I adjust the user permissions?
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().
I'm getting a fatal error, what gives?
Declaring the wrong namespace version string will definitely fatal error. This is common in development.