'This is the label', 'name' => 'dropdown_name', 'type' => 'select', 'options' => array( 'Option name'=>'option_value', 'Option name 2'=>'option_value_2', 'etc'=>'etc' ) ));?> * To get and use all stored options, just use something like: 'option_name' ?> */ //We include the class we extend from include_once('formelements.php'); class Sircontheme_Options extends Sircontheme_Formelements { protected $fields = array(), $vals = array(), $is_options_page, $has_been_enabled = false, $image_script_included = false; public function add_options_page_in_hook(){ add_theme_page(__('Theme Options', 'sircon_evo'), __('Theme Options', 'sircon_evo'), 'manage_options', 'sircon-theme-options', array($this, 'options_page_output')); if($_GET['page'] === 'sircon-theme-options'){ add_action( 'admin_enqueue_scripts', array($this, 'include_colorpicker')); } } /* needs to be run to hook into everything we need for metabox handling */ private function enable_options_page(){ if($this->has_been_enabled) return; /* Already done, move along */ add_action('admin_menu', array($this, 'add_options_page_in_hook')); add_action('admin_init', array($this, 'save_options'),1); $this->has_been_enabled = true; } /* Simply allow wordpress to output the options page title, and save some options */ public function options_page_output(){ //Include colorpicker //begin output //Default styles! echo ''; //prepare some vars and make sure changes from last click is saved $this->is_options_page = true; $this->vals = $this->get_options(); $hash_value = isset($_GET['hash']) ? $_GET['hash'] : 'primary'; $current_primary = !isset($_GET['hash']) || $_GET['hash'] === 'primary' ? ' current-fieldset' : ''; echo '