'Right', 'comments_pages' => 'No', 'comments_posts' => 'No', 'analytics' => 'Yes' // <-- no comma after the last option ); // push the defaults to the options database, // if options don't yet exist there. add_option(SP_SETTINGS_FIELD, $defaults, '', 'yes'); /* /////////////////////////////////////////////// This section hooks the proper functions to the proper actions in WordPress \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */ // this function registers our settings in the db add_action('admin_init', 'register_theme_settings'); function register_theme_settings() { register_setting(SP_SETTINGS_FIELD, SP_SETTINGS_FIELD); } // this function adds the settings page to the Appearance tab add_action('admin_menu', 'add_theme_options_menu'); function add_theme_options_menu() { add_submenu_page('themes.php', 'Bahama '.__('Theme Options','studiopress'), 'Bahama '.__('Theme Options','studiopress'), 8, 'theme-options', 'theme_settings_admin'); } /* /////////////////////////////////////////////// This section handles all the admin page output (forms, update notifications, etc.) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */ function theme_settings_admin() { ?>
'.__('Theme Options', 'studiopress').' '.__('RESET TO DEFAULTS', 'studiopress').'
'.__('Theme Options', 'studiopress').' '.__('SAVED', 'studiopress').'