Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeSz/69bd2e92f59b2273747a8114a5aa14ef to your computer and use it in GitHub Desktop.
Save JoeSz/69bd2e92f59b2273747a8114a5aa14ef to your computer and use it in GitHub Desktop.
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