__('Use This Image', 'picochic') )); } add_action( 'admin_enqueue_scripts', 'picochic_admin_enqueue_scripts' ); // Default options values $picochic_options = array( 'custom_color' => '#364D96', 'custom_favicon' => '', 'custom_logo' => '', 'logo_centered' => '0', 'main_background' => '0', 'show_header_search' => '1', 'custom_header_height' => '42', 'show_about_the_author' => '0', 'link_to_read_more' => '1' ); if ( is_admin() ) : // Load only if we are viewing an admin page function picochic_register_settings() { // Register the settings register_setting( 'picochic_theme_options', 'picochic_options', 'picochic_validate_options' ); } add_action( 'admin_init', 'picochic_register_settings' ); function picochic_theme_options() { // Add theme options page to the addmin menu add_theme_page( __( 'Options', 'picochic'), __( 'Options', 'picochic'), 'edit_theme_options', 'theme_options', 'picochic_theme_options_page'); } add_action( 'admin_menu', 'picochic_theme_options' ); // Function to generate options page function picochic_theme_options_page() { global $picochic_options, $picochic_categories, $picochic_layouts; if ( ! isset( $_REQUEST['updated'] ) ) $_REQUEST['updated'] = false; // This checks whether the form has just been submitted. ?>