Structured fields
Options pages
Reference, generated from the plugin source
Options-page typed fields.
Same controls config shape as PostFields\Registrar — register once, get an admin page rendering those controls, values saved to wp_options.
Public entry-point lives in includes/Options/helpers.php as gcblite_register_options_fields($slug, $config). Themes call it the same way they call gcblite_register_post_fields.
gcblite_register_options_fields('site_settings', [
'page_title' => 'Site settings', // <title> + heading
'menu_title' => 'Site settings', // sidebar entry
'capability' => 'manage_options', // default
'parent' => null, // top-level menu (default)
// OR 'options-general.php' / 'themes.php' / etc.
'icon' => 'dashicons-admin-generic', // top-level only
'position' => null, // menu position
'controls' => [ ...gcblite controls... ],
]);Stored under a single option per slug, JSON-encoded:
option_name = "gcblite_options_{slug}"
option_value = { attributeKey: value, ... }Reads via REST at /wp-json/gcblite/v1/options/{slug} so headless frontends can pull options the same way they pull post meta.
Functions
gcblite_register_options_fields()
gcblite_register_options_fields($slug, array $config)gcblite_get_options()
gcblite_get_options($slug)