Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Exopite Simple Options Framework Settings
<?php
$config = array(
'type' => 'menu', // Required, menu or metabox
'id' => $this->plugin_name, // Required, meta box id, unique per page,
// to save: get_option( id )
'menu' => 'plugins.php', // Required, sub page to your options page
'submenu' => true, // Required for submenu
'title' => 'The name', // The name of this page
'capability' => 'manage_options', // The capability needed to view the page
'tabbed' => false, // Separate sections to tabs
);
$fields[] = array(
'name' => 'first',
'title' => 'Section First',
'fields' => array(
// fields...
array(
'id' => 'autoload',
'type' => 'switcher',
'title' => 'Field title',
'default' => 'yes',
),
),
);
$fields[] = array(
'name' => 'second',
'title' => 'Section Second',
'fields' => array(
// fields...
array(
'id' => 'autoload',
'type' => 'switcher',
'title' => 'Field title',
'default' => 'yes',
),
),
);
$options_panel = new Exopite_Simple_Options_Framework( $config, $fields );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.