'', 'facebook_link' => '', 'twitter_link' => '', 'gplus_link' => '', 'linkedin_link' => '', 'github_link' => '', 'pinterest_link' => '', 'feed_link' => '', 'social_bar' => true, 'bartleby_logo' => '' ); if ( is_admin() ) : // Load only if we are viewing an admin page function bartleby_register_settings() { // Register settings and call sanitation functions register_setting( 'bartleby_theme_options', 'bartleby_options', 'bartleby_validate_options' ); } add_action( 'admin_init', 'bartleby_register_settings' ); function bartleby_theme_options() { // Add theme options page to the addmin menu add_theme_page( 'Theme Options', 'Theme Options', 'edit_theme_options', 'theme_options', 'bartleby_theme_options_page' ); } add_action( 'admin_menu', 'bartleby_theme_options' ); // Function to generate options page function bartleby_theme_options_page() { global $bartleby_options, $bartleby_categories, $bartleby_layouts; if ( ! isset( $_REQUEST['updated'] ) ) $_REQUEST['updated'] = false; // This checks whether the form has just been submitted. ?>