Created
January 2, 2018 19:30
-
-
Save JoeSz/69bd2e92f59b2273747a8114a5aa14ef to your computer and use it in GitHub Desktop.
Exopite Simple Options Framework Settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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