<?php
// Themes Options Menu
$shortname = "theme";
$page_handle = $shortname . '-options';
$options = array(
    array("name" => __('General Settings', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_general_settings"),
    array(
        "name" => __('Theme Skin', 'gp_lang'),
        "desc" => __('Choose the theme skin (can be overridden on individual posts/pages)', 'gp_lang'),
        "id" => $shortname . "_skin",
        "std" => "",
        "options" => array('asong2u' => __('ASong2U', 'gp_lang'), 'blue' => __('Blue', 'gp_lang'), 'black' => __('Black', 'gp_lang')),
        "type" => "select"),
    array(
        "name" => __('Custom Stylesheet', 'gp_lang'),
        "desc" => __('Enter the relative URL to your custom stylesheet e.g. <code>lib/css/custom-style.css</code> (can be overridden on individual posts/pages).', 'gp_lang'),
        "id" => $shortname . "_custom_stylesheet",
        "std" => "",
        "type" => "text"),
    array("type" => "divider"),
    array(
        "name" => __('Custom Logo Image', 'gp_lang'),
        "desc" => __('Upload your own logo.', 'gp_lang'),
        "id" => $shortname . "_logo",
        "std" => "",
        "type" => "upload_image"),
    array(
        "name" => __('Logo Top Margin', 'gp_lang'),
        "desc" => __('Enter the top margin of your logo.', 'gp_lang'),
        "id" => $shortname . "_logo_top",
        "std" => "",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Logo Left Margin', 'gp_lang'),
        "desc" => __('Enter the left margin of your logo.', 'gp_lang'),
        "id" => $shortname . "_logo_left",
        "std" => "",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Logo Bottom Margin', 'gp_lang'),
        "desc" => __('Enter the bottom margin of your logo.', 'gp_lang'),
        "id" => $shortname . "_logo_bottom",
        "std" => "",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array("type" => "divider"),
    array(
        "name" => __('Login/Register/Profile Links', 'gp_lang'),
        "desc" => __('Choose whether to display the login, register and profile links.', 'gp_lang'),
        "id" => $shortname . "_profile_links",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Login Page URL', 'gp_lang'),
        "desc" => __('Enter the URL of the page you have assigned the Login page template to.', 'gp_lang'),
        "id" => $shortname . "_login_url",
        "std" => "",
        "type" => "text"),
    array(
        "name" => __('Register Page URL', 'gp_lang'),
        "desc" => __('Enter the URL of the page you have assigned the Register page template to (leave blank if you are using BuddyPress, as a register page will have already been created).', 'gp_lang'),
        "id" => $shortname . "_register_url",
        "std" => "",
        "type" => "text"),
    array("type" => "divider"),
    array(
        "name" => __('Search Form', 'gp_lang'),
        "desc" => __('Choose whether to display the search form in the navigation panel.', 'gp_lang'),
        "id" => $shortname . "_search_form",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Search Criteria', 'gp_lang'),
        "desc" => __('Choose what posts and pages show up in search results.', 'gp_lang'),
        "id" => $shortname . "_search_criteria",
        "std" => "",
        "options" => array('All Posts And /Pages' => __('All Posts And Pages', 'gp_lang'), 'All Posts' => __('All Posts', 'gp_lang'), 'Review Posts Only' => __('Review Posts Only', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('RSS Feed Button', 'gp_lang'),
        "desc" => __('Display the RSS feed button with the default RSS feed or enter a custom feed below.', 'gp_lang'),
        "id" => $shortname . "_rss_button",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('RSS URL', 'gp_lang'),
        "id" => $shortname . "_rss",
        "std" => "",
        "desc" => '',
        "type" => "text"),
    array(
        "name" => __('Twitter URL', 'gp_lang'),
        "id" => $shortname . "_twitter",
        "std" => "",
        "desc" => '',
        "type" => "text"),
    array(
        "name" => __('Facebook URL', 'gp_lang'),
        "id" => $shortname . "_facebook",
        "std" => "",
        "desc" => '',
        "type" => "text"),
    array(
        "name" => __('Digg URL', 'gp_lang'),
        "id" => $shortname . "_digg",
        "std" => "",
        "desc" => '',
        "type" => "text"),
    array(
        "name" => __('Delicious URL', 'gp_lang'),
        "id" => $shortname . "_delicious",
        "std" => "",
        "desc" => '',
        "type" => "text"),
    array(
        "name" => __('Dribbble URL', 'gp_lang'),
        "id" => $shortname . "_dribbble",
        "std" => "",
        "desc" => '',
        "type" => "text"),
    array(
        "name" => __('YouTube URL', 'gp_lang'),
        "id" => $shortname . "_youtube",
        "std" => "",
        "desc" => '',
        "type" => "text"),
    array(
        "name" => __('Vimeo URL', 'gp_lang'),
        "id" => $shortname . "_vimeo",
        "std" => "",
        "desc" => '',
        "type" => "text"),
    array(
        "name" => __('LinkedIn URL', 'gp_lang'),
        "id" => $shortname . "_linkedin",
        "std" => "",
        "desc" => '',
        "type" => "text"),
    array(
        "name" => __('Google+ URL', 'gp_lang'),
        "id" => $shortname . "_googleplus",
        "std" => "",
        "desc" => '',
        "type" => "text"),
    array(
        "name" => __('Additional Social Icons', 'gp_lang'),
        "desc" => __('Add additional social icons by entering the link and image HTML code e.g. <code>&lt;a href=&quot;http://social-link.com&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;' . get_template_directory_uri() . '/images/socialicon.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;</code>', 'gp_lang'),
        "id" => $shortname . "_additional_social_icons",
        "std" => "",
        "type" => "textarea"),
    array("type" => "divider"),
    array(
        "name" => __('Favicon URL (.ico)', 'gp_lang'),
        "desc" => __('Type the URL of the favicon image (.ico, 16x16 or 32x32)', 'gp_lang'),
        "id" => $shortname . "_favicon_ico",
        "std" => "",
        "type" => "upload_image"),
    array(
        "name" => __('Favicon URL (.png)', 'gp_lang'),
        "desc" => __('Type the URL of the favicon image (.png, 16x16 or 32x32)', 'gp_lang'),
        "id" => $shortname . "_favicon_png",
        "std" => "",
        "type" => "upload_image"),
    array(
        "name" => __('Apple Icon URL (.png)', 'gp_lang'),
        "desc" => __('Type the URL of the apple icon image (.png, 57x57), used for display on the Apple iPhone', 'gp_lang'),
        "id" => $shortname . "_apple_icon",
        "std" => "",
        "type" => "upload_image"),
    array("type" => "divider"),
    array(
        "name" => __('Header Content', 'gp_lang'),
        "desc" => __('Enter the content you want to display in the header (e.g. Google advertisements).', 'gp_lang'),
        "id" => $shortname . "_header_content",
        "std" => "",
        "type" => "textarea"),
    array("type" => "divider"),
    array(
        "name" => __('Scroller Display', 'gp_lang'),
        "desc" => __('Choose how to display the scroller.', 'gp_lang'),
        "id" => $shortname . "_scroller_display",
        "std" => "",
        "options" => array('Scrolling' => __('Scrolling', 'gp_lang'), 'No Scrolling' => __('No Scrolling', 'gp_lang'), 'Disable' => __('Disable', 'gp_lang')),
        "type" => "select"),
    array(
        "name" => __('Scroller Title', 'gp_lang'),
        "desc" => __('Enter the title you want to add to the scroller.', 'gp_lang'),
        "id" => $shortname . "_scroller_title",
        "std" => "Headlines",
        "type" => "text"),
    array(
        "name" => __('Scroller Text', 'gp_lang'),
        "desc" => __('Enter any text you want to add to the scroller.', 'gp_lang'),
        "id" => $shortname . "_scroller_text",
        "std" => "",
        "type" => "textarea"),
    array(
        "name" => __('Scroller Category IDs', 'gp_lang'),
        "desc" => __('Enter the IDs of the <a href="../wp-admin/edit-tags.php?taxonomy=category">post categories</a> you want to display (leave blank to display all categories).', 'gp_lang'),
        "id" => $shortname . "_scroller_cats",
        "std" => "",
        "type" => "text"),
    array(
        "name" => __('Number Of Scroller Posts', 'gp_lang'),
        "desc" => __('The number of posts to display (set to -1 to display all posts).', 'gp_lang'),
        "id" => $shortname . "_scroller_posts",
        "std" => "5",
        "type" => "text",
        "size" => "small"),
    array("type" => "divider"),
    array(
        "name" => __('Footer Widgets', 'gp_lang'),
        "desc" => __('Choose where to display your footer widgets.', 'gp_lang'),
        "id" => $shortname . "_footer_widgets",
        "std" => "",
        "options" => array('All Pages' => __('All Pages', 'gp_lang'), 'Homepage' => __('Homepage', 'gp_lang')),
        "type" => "select"),
    array(
        "name" => __('Footer Content', 'gp_lang'),
        "desc" => __('Enter the content you want to display in the bottom section of the footer.', 'gp_lang'),
        "id" => $shortname . "_footer_content",
        "std" => '',
        "type" => "textarea"),
    array("type" => "divider"),
    array(
        "name" => __('Scripts', 'gp_lang'),
        "desc" => __('Enter any scripts that need to be embedded into the theme (e.g. Google Analytics)', 'gp_lang'),
        "id" => $shortname . "_scripts",
        "std" => "",
        "type" => "textarea"),
    array("type" => "close"),
    array("name" => __('Font style', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_fontstyle_settings"),
    array(
        "name" => __('Dedication font', 'gp_lang'),
        "desc" => __('Font style for dedication text', 'gp_lang'),
        "id" => $shortname . "_font_dedication",
        "std" => "",
        "options" => array(
            'Bad+Script' => __('Bad Script', 'gp_lang'),
            'Give+You+Glory' => __('Give You Glory', 'gp_lang'),
            'Handlee' => __('Handlee', 'gp_lang'),
            'Indie+Flower' => __('Indie Flower', 'gp_lang'),
            'Patrick+Hand' => __('Patrick Hand', 'gp_lang'),
            'Shadows+Into+Light' => __('Shadows Into Light', 'gp_lang'),
            'Shadows+Into+Light+Two' => __('Shadows Into Light Two', 'gp_lang'),
        ),
        "type" => "select"),
    array("type" => "close"),

    
array("name" => __('Video Slider Settings', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_video_slider_settings"),
    array(
        "name" => __('Number Of Slides', 'gp_lang'),
        "desc" => __('The number of slides to display (set to -1 to display all slides).', 'gp_lang'),
        "id" => $shortname . "_video_slides",
        "std" => "5",
        "type" => "text",
        "size" => "small"),
    array("type" => "close"),
    
    
    
    array("name" => __('Slider Settings', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_slider_settings"),
    array(
        "name" => __('Slider', 'gp_lang'),
        "desc" => __('Choose whether to display the slider.', 'gp_lang'),
        "id" => $shortname . "_slider",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Slider Category IDs', 'gp_lang'),
        "desc" => __('Enter the IDs of the <a href="../wp-admin/edit-tags.php?taxonomy=slide_categories&post_type=slide">slider categories</a> and <a href="../wp-admin/edit-tags.php?taxonomy=category">post categories</a> you want to display.', 'gp_lang'),
        "id" => $shortname . "_slider_cats",
        "std" => "",
        "type" => "text"),
    array(
        "name" => __('Slider Order', 'gp_lang'),
        "desc" => __('Choose how to order your slides.', 'gp_lang'),
        "id" => $shortname . "_slider_orderby",
        "std" => "",
        "options" => array('Date' => __('Date', 'gp_lang'), 'Custom Order' => __('Custom Order', 'gp_lang'), 'Site Score' => __('Site Score', 'gp_lang'), 'User Score' => __('User Score', 'gp_lang')),
        "type" => "select"),
    array(
        "name" => __('Slider Score Type', 'gp_lang'),
        "desc" => __('Choose the score type to display (only applies to posts added to slider).', 'gp_lang'),
        "id" => $shortname . "_slider_score_type",
        "std" => "",
        "options" => array('Site Score' => __('Site Score', 'gp_lang'), 'User Score' => __('User Score', 'gp_lang'), 'Site & User Score' => __('Site & User Score', 'gp_lang'), 'No Scores' => __('No Scores', 'gp_lang')),
        "type" => "select"),
    array(
        "name" => __('Number Of Slides', 'gp_lang'),
        "desc" => __('The number of slides to display (set to -1 to display all slides).', 'gp_lang'),
        "id" => $shortname . "_slides",
        "std" => "10",
        "type" => "text",
        "size" => "small"),
    array(
        "name" => __('Slider Scroll', 'gp_lang'),
        "desc" => __('Choose whether to have the slider automatically scroll.', 'gp_lang'),
        "id" => $shortname . "_slider_scroll",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Slider Scroll Speed', 'gp_lang'),
        "desc" => __('Enter the number of milliseconds you want between each slide transition.', 'gp_lang'),
        "id" => $shortname . "_slider_scroll_speed",
        "std" => "500",
        "type" => "text",
        "size" => "small"),
    array("type" => "close"),
    
    
    array("name" => __('Homepage Settings', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_homepage_settings"),
    array(
        "name" => __('Thumbnail Width', 'gp_lang'),
        "desc" => __('The width to crop the thumbnail to (can be overridden on individual posts, set to 0 to have a proportionate width).', 'gp_lang'),
        "id" => $shortname . "_homepage_thumbnail_width",
        "std" => "300",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Thumbnail Height', 'gp_lang'),
        "desc" => __('The height to crop the thumbnail to (can be overridden on individual posts, set to 0 to have a proportionate height).', 'gp_lang'),
        "id" => $shortname . "_homepage_thumbnail_height",
        "std" => "0",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Image Wrap', 'gp_lang'),
        "desc" => __('Choose whether the page content wraps around the featured image.', 'gp_lang'),
        "id" => $shortname . "_homepage_image_wrap",
        "std" => "",
        "options" => array('Enable' => __('Enable', 'gp_lang'), 'Disable' => __('Disable', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Homepage Category IDs', 'gp_lang'),
        "desc" => __('Enter the IDs of the <a href="../wp-admin/edit-tags.php?taxonomy=category">post categories</a> you want to display (leave blank to display all categories).', 'gp_lang'),
        "id" => $shortname . "_homepage_cats",
        "std" => get_category_by_slug(BP_DEDICATION_SLUG),
        "type" => "text"),
    array("type" => "divider"),
    array(
        "name" => __('Layout', 'gp_lang'),
        "desc" => __('Choose the page layout.', 'gp_lang'),
        "id" => $shortname . "_homepage_layout",
        "std" => "",
        "options" => array('sb-right' => __('Sidebar Right', 'gp_lang'), 'sb-left' => __('Sidebar Left', 'gp_lang'), 'fullwidth' => __('Fullwidth', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Title', 'gp_lang'),
        "desc" => __('Choose whether to display the page title.', 'gp_lang'),
        "id" => $shortname . "_homepage_title",
        "std" => "",
        "options" => array('Show' => __('Show', 'gp_lang'), 'Hide' => __('Hide', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Posts Per Page', 'gp_lang'),
        "desc" => __('The number of posts per page.', 'gp_lang'),
        "id" => $shortname . "_homepage_posts_per_page",
        "std" => "4",
        "type" => "text",
        "size" => "small"),
    array("type" => "divider"),
    array(
        "name" => __('Content Display', 'gp_lang'),
        "desc" => __('Choose whether to display the full post content or an excerpt.', 'gp_lang'),
        "id" => $shortname . "_homepage_content_display",
        "std" => "0",
        "options" => array('Excerpt', 'Full Content'),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Excerpt Length', 'gp_lang'),
        "desc" => __('The number of characters in excerpts.', 'gp_lang'),
        "id" => $shortname . "_homepage_excerpt_length",
        "std" => "20",
        "type" => "text",
        "size" => "small"),
    array("type" => "divider"),
    array(
        "name" => __('Read More Link', 'gp_lang'),
        "desc" => __('Choose whether to display the read more links.', 'gp_lang'),
        "id" => $shortname . "_homepage_read_more",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Score Type', 'gp_lang'),
        "desc" => __('Choose the score type to display.', 'gp_lang'),
        "id" => $shortname . "_homepage_score_type",
        "std" => "0",
        "options" => array('Site Score' => __('Site Score', 'gp_lang'), 'User Score' => __('User Score', 'gp_lang'), 'Site & User Score' => __('Site & User Score', 'gp_lang'), 'No Scores' => __('No Scores', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Review Date Column', 'gp_lang'),
        "desc" => __('Choose whether to display the review date column.', 'gp_lang'),
        "id" => $shortname . "_homepage_review_date_column",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Drop Down Menu Filter', 'gp_lang'),
        "desc" => __('Choose whether to display the drop down menu filter.', 'gp_lang'),
        "id" => $shortname . "_homepage_dropdown_filter",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Homepage pagination', 'gp_lang'),
        "desc" => __('Choose whether to display the pagination.', 'gp_lang'),
        "id" => $shortname . "_homepage_pagination",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Post Date', 'gp_lang'),
        "desc" => __('Choose whether to display the post date.', 'gp_lang'),
        "id" => $shortname . "_homepage_date",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Author', 'gp_lang'),
        "desc" => __('Choose whether to display the post author.', 'gp_lang'),
        "id" => $shortname . "_homepage_author",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Categories', 'gp_lang'),
        "desc" => __('Choose whether to display the post categories.', 'gp_lang'),
        "id" => $shortname . "_homepage_cats_",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Comments', 'gp_lang'),
        "desc" => __('Choose whether to display the post comments.', 'gp_lang'),
        "id" => $shortname . "_homepage_comments",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Tags', 'gp_lang'),
        "desc" => __('Choose whether to display the post tags.', 'gp_lang'),
        "id" => $shortname . "_homepage_tags",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "close"),
    array("name" => __('Blog Page Settings', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_blog_settings"),
    array(
        "name" => __('Thumbnail Width', 'gp_lang'),
        "desc" => __('The width to crop the thumbnail to (can be overridden on individual posts, set to 0 to have a proportionate width).', 'gp_lang'),
        "id" => $shortname . "_blog_thumbnail_width",
        "std" => "588",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Thumbnail Height', 'gp_lang'),
        "desc" => __('The height to crop the thumbnail to (can be overridden on individual posts, set to 0 to have a proportionate height).', 'gp_lang'),
        "id" => $shortname . "_blog_thumbnail_height",
        "std" => "250",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Image Wrap', 'gp_lang'),
        "desc" => __('Choose whether the page content wraps around the featured image.', 'gp_lang'),
        "id" => $shortname . "_blog_image_wrap",
        "std" => "",
        "options" => array('Disable' => __('Disable', 'gp_lang'), 'Enable' => __('Enable', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Blog Category IDs', 'gp_lang'),
        "desc" => __('Enter the IDs of the <a href="../wp-admin/edit-tags.php?taxonomy=category">post categories</a> you want to display (leave blank to display all categories).', 'gp_lang'),
        "id" => $shortname . "_blog_cats",
        "std" => "",
        "type" => "text"),
    array("type" => "divider"),
    array(
        "name" => __('Layout', 'gp_lang'),
        "desc" => __('Choose the page layout.', 'gp_lang'),
        "id" => $shortname . "_blog_layout",
        "std" => "",
        "options" => array('sb-right' => __('Sidebar Right', 'gp_lang'), 'sb-left' => __('Sidebar Left', 'gp_lang'), 'fullwidth' => __('Fullwidth', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Title', 'gp_lang'),
        "desc" => __('Choose whether to display the page title.', 'gp_lang'),
        "id" => $shortname . "_blog_title",
        "std" => "",
        "options" => array('Show' => __('Show', 'gp_lang'), 'Hide' => __('Hide', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Posts Per Page', 'gp_lang'),
        "desc" => __('The number of posts per page.', 'gp_lang'),
        "id" => $shortname . "_blog_posts_per_page",
        "std" => "10",
        "type" => "text",
        "size" => "small"),
    array("type" => "divider"),
    array(
        "name" => __('Content Display', 'gp_lang'),
        "desc" => __('Choose whether to display the full post content or an excerpt.', 'gp_lang'),
        "id" => $shortname . "_blog_content_display",
        "std" => "0",
        "options" => array('Excerpt', 'Full Content'),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Excerpt Length', 'gp_lang'),
        "desc" => __('The number of characters in excerpts.', 'gp_lang'),
        "id" => $shortname . "_blog_excerpt_length",
        "std" => "50",
        "type" => "text",
        "size" => "small"),
    array("type" => "divider"),
    array(
        "name" => __('Read More Link', 'gp_lang'),
        "desc" => __('Choose whether to display the read more links.', 'gp_lang'),
        "id" => $shortname . "_blog_read_more",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    /*array(
        "name" => __('Score Type', 'gp_lang'),
        "desc" => __('Choose the score type to display.', 'gp_lang'),
        "id" => $shortname . "_blog_score_type",
        "std" => "1",
        "options" => array('Site Score' => __('Site Score', 'gp_lang'), 'User Score' => __('User Score', 'gp_lang'), 'Site & User Score' => __('Site & User Score', 'gp_lang'), 'No Scores' => __('No Scores', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),*/
    array(
        "name" => __('Review Date Column', 'gp_lang'),
        "desc" => __('Choose whether to display the review date column.', 'gp_lang'),
        "id" => $shortname . "_blog_review_date_column",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Drop Down Menu Filter', 'gp_lang'),
        "desc" => __('Choose whether to display the drop down menu filter.', 'gp_lang'),
        "id" => $shortname . "_blog_dropdown_filter",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Post Date', 'gp_lang'),
        "desc" => __('Choose whether to display the post date.', 'gp_lang'),
        "id" => $shortname . "_blog_date",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Author', 'gp_lang'),
        "desc" => __('Choose whether to display the post author.', 'gp_lang'),
        "id" => $shortname . "_blog_author",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Categories', 'gp_lang'),
        "desc" => __('Choose whether to display the post categories.', 'gp_lang'),
        "id" => $shortname . "_blog_cats_",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Comments', 'gp_lang'),
        "desc" => __('Choose whether to display the post comments.', 'gp_lang'),
        "id" => $shortname . "_blog_comments",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Tags', 'gp_lang'),
        "desc" => __('Choose whether to display the post tags.', 'gp_lang'),
        "id" => $shortname . "_blog_tags",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "close"),
    array("name" => __('Category Settings', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_category_settings"),
    array(
        "name" => __('Thumbnail Width', 'gp_lang'),
        "desc" => __('The width to crop the thumbnail to (can be overridden on individual posts, set to 0 to have a proportionate width).', 'gp_lang'),
        "id" => $shortname . "_cat_thumbnail_width",
        "std" => "280",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Thumbnail Height', 'gp_lang'),
        "desc" => __('The height to crop the thumbnail to (can be overridden on individual posts, set to 0 to have a proportionate height).', 'gp_lang'),
        "id" => $shortname . "_cat_thumbnail_height",
        "std" => "130",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Image Wrap', 'gp_lang'),
        "desc" => __('Choose whether the page content wraps around the featured image.', 'gp_lang'),
        "id" => $shortname . "_cat_image_wrap",
        "std" => "",
        "options" => array('Enable' => __('Enable', 'gp_lang'), 'Disable' => __('Disable', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Layout', 'gp_lang'),
        "desc" => __('Choose the page layout.', 'gp_lang'),
        "id" => $shortname . "_cat_layout",
        "std" => "",
        "options" => array('sb-right' => __('Sidebar Right', 'gp_lang'), 'sb-left' => __('Sidebar Left', 'gp_lang'), 'fullwidth' => __('Fullwidth', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Title', 'gp_lang'),
        "desc" => __('Choose whether to display the page title.', 'gp_lang'),
        "id" => $shortname . "_cat_title",
        "std" => "",
        "options" => array('Show' => __('Show', 'gp_lang'), 'Hide' => __('Hide', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Posts Per Page', 'gp_lang'),
        "desc" => __('The number of posts per page.', 'gp_lang'),
        "id" => $shortname . "_cat_posts_per_page",
        "std" => "6",
        "type" => "text",
        "size" => "small"),
    array("type" => "divider"),
    array(
        "name" => __('Content Display', 'gp_lang'),
        "desc" => __('Choose whether to display the full post content or an excerpt.', 'gp_lang'),
        "id" => $shortname . "_cat_content_display",
        "std" => "0",
        "options" => array(__('Excerpt', 'gp_lang'), __('Full Content', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Excerpt Length', 'gp_lang'),
        "desc" => __('The number of characters in excerpts on category, archive, search, tag pages etc.', 'gp_lang'),
        "id" => $shortname . "_cat_excerpt_length",
        "std" => "40",
        "type" => "text",
        "size" => "small"),
    array("type" => "divider"),
    array(
        "name" => __('Read More Link', 'gp_lang'),
        "desc" => __('Choose whether to display the read more links.', 'gp_lang'),
        "id" => $shortname . "_cat_read_more",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Score Type', 'gp_lang'),
        "desc" => __('Choose the score type to display on category, archive, search, tag pages etc.', 'gp_lang'),
        "id" => $shortname . "_cat_score_type",
        "std" => "0",
        "options" => array('Site Score' => __('Site Score', 'gp_lang'), 'User Score' => __('User Score', 'gp_lang'), 'Site & User Score' => __('Site & User Score', 'gp_lang'), 'No Scores' => __('No Scores', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Review Date Column', 'gp_lang'),
        "desc" => __('Choose whether to display the review date column.', 'gp_lang'),
        "id" => $shortname . "_cat_review_date_column",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Drop Down Menu Filter', 'gp_lang'),
        "desc" => __('Choose whether to display the drop down menu filter.', 'gp_lang'),
        "id" => $shortname . "_cat_dropdown_filter",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Post Date', 'gp_lang'),
        "desc" => __('Choose whether to display the post date.', 'gp_lang'),
        "id" => $shortname . "_cat_date",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Author', 'gp_lang'),
        "desc" => __('Choose whether to display the post author.', 'gp_lang'),
        "id" => $shortname . "_cat_author",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Categories', 'gp_lang'),
        "desc" => __('Choose whether to display the post categories.', 'gp_lang'),
        "id" => $shortname . "_cat_cats",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Comments', 'gp_lang'),
        "desc" => __('Choose whether to display the post comments.', 'gp_lang'),
        "id" => $shortname . "_cat_comments",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Tags', 'gp_lang'),
        "desc" => __('Choose whether to display the post tags.', 'gp_lang'),
        "id" => $shortname . "_cat_tags",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "close"),
    array("name" => __('Post Settings', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_post_settings"),
    array(
        "name" => __('Featured Image', 'gp_lang'),
        "desc" => __('Choose whether to display the featured image (can be overridden on individual posts).', 'gp_lang'),
        "id" => $shortname . "_show_post_image",
        "std" => "",
        "options" => array('Show' => __('Show', 'gp_lang'), 'Hide' => __('Hide', 'gp_lang')),
        "type" => "select"),
    array(
        "name" => __('Image Width', 'gp_lang'),
        "desc" => __('The width to crop the image to (can be overridden on individual posts, set to 0 to have a proportionate width).', 'gp_lang'),
        "id" => $shortname . "_post_image_width",
        "std" => "588",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Image Height', 'gp_lang'),
        "desc" => __('The height to crop the image to (can be overridden on individual posts, set to 0 to have a proportionate height).', 'gp_lang'),
        "id" => $shortname . "_post_image_height",
        "std" => "200",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Image Wrap', 'gp_lang'),
        "desc" => __('Choose whether the page content wraps around the featured image (can be overridden on individual posts).', 'gp_lang'),
        "id" => $shortname . "_post_image_wrap",
        "std" => "",
        "options" => array('Disable' => __('Disable', 'gp_lang'), 'Enable' => __('Enable', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Layout', 'gp_lang'),
        "desc" => __('Choose the page layout (can be overridden on individual posts).', 'gp_lang'),
        "id" => $shortname . "_post_layout",
        "std" => "",
        "options" => array('sb-right' => __('Sidebar Right', 'gp_lang'), 'sb-left' => __('Sidebar Left', 'gp_lang'), 'fullwidth' => __('Fullwidth', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Title', 'gp_lang'),
        "desc" => __('Choose whether to display the page title (can be overridden on individual posts).', 'gp_lang'),
        "id" => $shortname . "_post_title",
        "std" => "",
        "options" => array('Show' => __('Show', 'gp_lang'), 'Hide' => __('Hide', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Post Date', 'gp_lang'),
        "desc" => __('Choose whether to display the post date.', 'gp_lang'),
        "id" => $shortname . "_post_date",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Author', 'gp_lang'),
        "desc" => __('Choose whether to display the post author.', 'gp_lang'),
        "id" => $shortname . "_post_author",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Categories', 'gp_lang'),
        "desc" => __('Choose whether to display the post categories.', 'gp_lang'),
        "id" => $shortname . "_post_cats",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Comments', 'gp_lang'),
        "desc" => __('Choose whether to display the post comments.', 'gp_lang'),
        "id" => $shortname . "_post_comments",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Share Link', 'gp_lang'),
        "desc" => __('Choose whether to display the share link.', 'gp_lang'),
        "id" => $shortname . "_post_share_link",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Tags', 'gp_lang'),
        "desc" => __('Choose whether to display the post tags.', 'gp_lang'),
        "id" => $shortname . "_post_tags",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Author Info Panel', 'gp_lang'),
        "desc" => __('Choose whether to display the author info panel.', 'gp_lang'),
        "id" => $shortname . "_post_author_info",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Related Items', 'gp_lang'),
        "desc" => __('Choose whether to display related items.', 'gp_lang'),
        "id" => $shortname . "_post_related_items",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Image Width', 'gp_lang'),
        "desc" => __('The width to crop the image to (set to 0 to have a proportionate width).', 'gp_lang'),
        "id" => $shortname . "_post_related_image_width",
        "std" => "120",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Image Height', 'gp_lang'),
        "desc" => __('The height to crop the image to (set to 0 to have a proportionate height).', 'gp_lang'),
        "id" => $shortname . "_post_related_image_height",
        "std" => "100",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Related Items Category IDs', 'gp_lang'),
        "desc" => __('Enter the IDs of the <a href="../wp-admin/edit-tags.php?taxonomy=category">post categories</a> you want to display in the related items section.', 'gp_lang'),
        "id" => $shortname . "_post_related_cats",
        "std" => "",
        "type" => "text"),
    array("type" => "close"),
    array("name" => __('Page Settings', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_page_settings"),
    array(
        "name" => __('Featured Image', 'gp_lang'),
        "desc" => __('Choose whether to display the featured image (can be overridden on individual pages).', 'gp_lang'),
        "id" => $shortname . "_show_page_image",
        "std" => "",
        "options" => array('Show' => __('Show', 'gp_lang'), 'Hide' => __('Hide', 'gp_lang')),
        "type" => "select"),
    array(
        "name" => __('Image Width', 'gp_lang'),
        "desc" => __('The width to crop the image to (can be overridden on individual pages, set to 0 to have a proportionate width).', 'gp_lang'),
        "id" => $shortname . "_page_image_width",
        "std" => "640",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Image Height', 'gp_lang'),
        "desc" => __('The height to crop the image to (can be overridden on individual pages, set to 0 to have a proportionate height).', 'gp_lang'),
        "id" => $shortname . "_page_image_height",
        "std" => "250",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Image Wrap', 'gp_lang'),
        "desc" => __('Choose whether the page content wraps around the featured image (can be overridden on individual pages).', 'gp_lang'),
        "id" => $shortname . "_page_image_wrap",
        "std" => "",
        "options" => array('Disable' => __('Disable', 'gp_lang'), 'Enable' => __('Enable', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Layout', 'gp_lang'),
        "desc" => __('Choose the page layout (can be overridden on individual pages).', 'gp_lang'),
        "id" => $shortname . "_page_layout",
        "std" => "",
        "options" => array('sb-right' => __('Sidebar Right', 'gp_lang'), 'sb-left' => __('Sidebar Left', 'gp_lang'), 'fullwidth' => __('Fullwidth', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Title', 'gp_lang'),
        "desc" => __('Choose whether to display the page title (can be overridden on individual pages).', 'gp_lang'),
        "id" => $shortname . "_page_title",
        "std" => "",
        "options" => array('Show' => __('Show', 'gp_lang'), 'Hide' => __('Hide', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Page Date', 'gp_lang'),
        "desc" => __('Choose whether to display the page date.', 'gp_lang'),
        "id" => $shortname . "_page_date",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Page Author', 'gp_lang'),
        "desc" => __('Choose whether to display the page author.', 'gp_lang'),
        "id" => $shortname . "_page_author",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Page Comments', 'gp_lang'),
        "desc" => __('Choose whether to display the page comments.', 'gp_lang'),
        "id" => $shortname . "_page_comments",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Share Link', 'gp_lang'),
        "desc" => __('Choose whether to display the share link.', 'gp_lang'),
        "id" => $shortname . "_page_share_link",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Author Info Panel', 'gp_lang'),
        "desc" => __('Choose whether to display an author info panel.', 'gp_lang'),
        "id" => $shortname . "_page_author_info",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "close"),
    array("name" => __('Review Post Settings', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_review_post_settings"),
    array(
        "name" => __('Featured Image', 'gp_lang'),
        "desc" => __('Choose whether to display the featured image (can be overridden on individual reviews).', 'gp_lang'),
        "id" => $shortname . "_show_review_image",
        "std" => "",
        "options" => array('Show' => __('Show', 'gp_lang'), 'Hide' => __('Hide', 'gp_lang')),
        "type" => "select"),
    array(
        "name" => __('Image Width', 'gp_lang'),
        "desc" => __('The width to crop the image to (can be overridden on individual reviews, set to 0 to have a proportionate width).', 'gp_lang'),
        "id" => $shortname . "_review_image_width",
        "std" => "640",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Image Height', 'gp_lang'),
        "desc" => __('The height to crop the image to (can be overridden on individual reviews, set to 0 to have a proportionate height).', 'gp_lang'),
        "id" => $shortname . "_review_image_height",
        "std" => "250",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array("type" => "divider"),
    array(
        "name" => __('Layout', 'gp_lang'),
        "desc" => __('Choose the page layout (can be overridden on individual reviews).', 'gp_lang'),
        "id" => $shortname . "_review_layout",
        "std" => "",
        "options" => array('sb-right' => __('Sidebar Right', 'gp_lang'), 'sb-left' => __('Sidebar Left', 'gp_lang'), 'fullwidth' => __('Fullwidth', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Title', 'gp_lang'),
        "desc" => __('Choose whether to display the page title (can be overridden on individual reviews).', 'gp_lang'),
        "id" => $shortname . "_review_title",
        "std" => "",
        "options" => array('Show' => __('Show', 'gp_lang'), 'Hide' => __('Hide', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('User Voting', 'gp_lang'),
        "desc" => __('Choose how users can vote (can be overridden on individual reviews).', 'gp_lang'),
        "id" => $shortname . "_user_voting",
        "std" => "",
        "options" => array('Vote with or without posting a comment' => __('Vote with or without posting a comment', 'gp_lang'), 'Vote without posting a comment' => __('Vote without posting a comment', 'gp_lang'), 'Vote only when posting a comment' => __('Vote only when posting a comment', 'gp_lang'), 'Users cannot vote' => __('Users cannot vote', 'gp_lang')),
        "type" => "select"),
    array(
        "name" => __('User Comments', 'gp_lang'),
        "desc" => __('Choose whether users can post unlimited comments (can be overridden on individual reviews, only works with registered users).', 'gp_lang'),
        "id" => $shortname . "_user_comments",
        "std" => "",
        "options" => array('Unlimited Comments' => __('Unlimited Comments', 'gp_lang'), 'One Comment' => __('One Comment', 'gp_lang')),
        "type" => "select"),
    array(
        "name" => __('Comment Thumbs', 'gp_lang'),
        "desc" => __('Choose whether users can rate other comments (can be overridden on individual reviews).', 'gp_lang'),
        "id" => $shortname . "_comment_thumbs",
        "std" => "",
        "options" => array('Users can rate other comments' => __('Users can rate other comments', 'gp_lang'), 'Users cannot rate other comments' => __('Users cannot rate other comments', 'gp_lang')),
        "type" => "select"),
    array("type" => "divider"),
    array(
        "name" => __('Score Ranges', 'gp_lang'),
        "desc" => "",
        "id" => $shortname . "_score_range_1",
        "std" => "0",
        "type" => "text",
        "size" => "small",
        "details" => "to",
        "style" => "margin-top: 10px; float: left;"),
    array(
        "name" => "",
        "desc" => "",
        "id" => $shortname . "_score_range_2",
        "std" => "2.9",
        "type" => "text",
        "size" => "small",
        "details" => "",
        "style" => "margin-top: 10px; float: left; clear: none;"),
    array(
        "name" => "",
        "desc" => "Site Score Color",
        "id" => $shortname . "_site_score_color_1",
        "std" => "#aaaaaa",
        "type" => "colorpicker",
        "details" => "",
        "style" => "margin-top: 10px; margin-left: 10px; margin-right: 10px; float: left; clear: none;"),
    array(
        "name" => "",
        "desc" => "User Score Color",
        "id" => $shortname . "_user_score_color_1",
        "std" => "#979797",
        "type" => "colorpicker",
        "details" => "",
        "style" => "margin-top: 10px; float: left; clear: none;"),
    array("type" => "clear"),
    array(
        "name" => "",
        "desc" => "",
        "id" => $shortname . "_score_range_3",
        "std" => "3",
        "type" => "text",
        "size" => "small",
        "details" => "to",
        "style" => "float: left;"),
    array(
        "name" => "",
        "desc" => "",
        "id" => $shortname . "_score_range_4",
        "std" => "5.9",
        "type" => "text",
        "size" => "small",
        "details" => "",
        "style" => "float: left; clear: none;"),
    array(
        "name" => "",
        "desc" => "Site Score Color",
        "id" => $shortname . "_site_score_color_2",
        "std" => "#85c614",
        "type" => "colorpicker",
        "details" => "",
        "style" => "margin-left: 10px; margin-right: 10px; float: left; clear: none;"),
    array(
        "name" => "",
        "desc" => "User Score Color",
        "id" => $shortname . "_user_score_color_2",
        "std" => "#709767",
        "type" => "colorpicker",
        "details" => "",
        "style" => "float: left; clear: none;"),
    array("type" => "clear"),
    array(
        "name" => "",
        "desc" => "",
        "id" => $shortname . "_score_range_5",
        "std" => "6",
        "type" => "text",
        "size" => "small",
        "details" => "to",
        "style" => "float: left;"),
    array(
        "name" => "",
        "desc" => "",
        "id" => $shortname . "_score_range_6",
        "std" => "8.9",
        "type" => "text",
        "size" => "small",
        "details" => "",
        "style" => "float: left; clear: none;"),
    array(
        "name" => "",
        "desc" => "Site Score Color",
        "id" => $shortname . "_site_score_color_3",
        "std" => "#e5a700",
        "type" => "colorpicker",
        "details" => "",
        "style" => "margin-left: 10px; margin-right: 10px; float: left; clear: none;"),
    array(
        "name" => "",
        "desc" => "User Score Color",
        "id" => $shortname . "_user_score_color_3",
        "std" => "#978a67",
        "type" => "colorpicker",
        "details" => "",
        "style" => "float: left; clear: none;"),
    array("type" => "clear"),
    array(
        "name" => "",
        "desc" => "",
        "id" => $shortname . "_score_range_7",
        "std" => "9",
        "type" => "text",
        "size" => "small",
        "details" => "to",
        "style" => "float: left;"),
    array(
        "name" => "",
        "desc" => "",
        "id" => $shortname . "_score_range_8",
        "std" => "10",
        "type" => "text",
        "size" => "small",
        "details" => "",
        "style" => "float: left; clear: none;"),
    array(
        "name" => "",
        "desc" => "Site Score Color",
        "id" => $shortname . "_site_score_color_4",
        "std" => "#00abff",
        "type" => "colorpicker",
        "details" => "",
        "style" => "margin-left: 10px; margin-right: 10px; float: left; clear: none;"),
    array(
        "name" => "",
        "desc" => "User Score Color",
        "id" => $shortname . "_user_score_color_4",
        "std" => "#678397",
        "type" => "colorpicker",
        "details" => "",
        "style" => "float: left; clear: none;"),
    array("type" => "divider"),
    array(
        "name" => __('Post Date', 'gp_lang'),
        "desc" => __('Choose whether to display the post date.', 'gp_lang'),
        "id" => $shortname . "_review_date",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Author', 'gp_lang'),
        "desc" => __('Choose whether to display the post author.', 'gp_lang'),
        "id" => $shortname . "_review_author",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Categories', 'gp_lang'),
        "desc" => __('Choose whether to display the post categories.', 'gp_lang'),
        "id" => $shortname . "_review_cats",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Comments', 'gp_lang'),
        "desc" => __('Choose whether to display the post comments.', 'gp_lang'),
        "id" => $shortname . "_review_comments",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Share Link', 'gp_lang'),
        "desc" => __('Choose whether to display the share link.', 'gp_lang'),
        "id" => $shortname . "_review_share_link",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Post Tags', 'gp_lang'),
        "desc" => __('Choose whether to display the post tags.', 'gp_lang'),
        "id" => $shortname . "_review_tags",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Author Info Panel', 'gp_lang'),
        "desc" => __('Choose whether to display the author info panel.', 'gp_lang'),
        "id" => $shortname . "_review_author_info",
        "std" => "1",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "divider"),
    array(
        "name" => __('Related Items', 'gp_lang'),
        "desc" => __('Choose whether to display related items.', 'gp_lang'),
        "id" => $shortname . "_review_related_items",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array(
        "name" => __('Image Width', 'gp_lang'),
        "desc" => __('The width to crop the image to (set to 0 to have a proportionate width).', 'gp_lang'),
        "id" => $shortname . "_review_related_image_width",
        "std" => "120",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Image Height', 'gp_lang'),
        "desc" => __('The height to crop the image to (set to 0 to have a proportionate height).', 'gp_lang'),
        "id" => $shortname . "_review_related_image_height",
        "std" => "100",
        "type" => "text",
        "size" => "small",
        "details" => "px"),
    array(
        "name" => __('Related Items Category IDs', 'gp_lang'),
        "desc" => __('Enter the IDs of the <a href="../wp-admin/edit-tags.php?taxonomy=category">post categories</a> you want to display in the related items section.', 'gp_lang'),
        "id" => $shortname . "_review_related_cats",
        "std" => "",
        "type" => "text"),
    array("type" => "divider"),
    array(
        "name" => __('Follow Button', 'gp_lang'),
        "desc" => __('Choose whether to display the follow button.', 'gp_lang'),
        "id" => $shortname . "_reviews_follow",
        "std" => "0",
        "options" => array(__('Enable', 'gp_lang'), __('Disable', 'gp_lang')),
        "type" => "radio"),
    array("type" => "close"),
    array("name" => __('CSS Settings', 'gp_lang'),
        "type" => "title"),
    array("type" => "open",
        "id" => $shortname . "_css_settings"),
    array(
        "name" => __('Custom CSS', 'gp_lang'),
        "desc" => __('If you want to modify the theme style in some way add your own code here instead of editing the style sheets. Note: You may have to add !important to your tags in some cases so it overwrites the default settings e.g. <code>body {background: #000000 !important;}</code>.', 'gp_lang'),
        "id" => $shortname . "_custom_css",
        "std" => "",
        "size" => "large",
        "type" => "textarea"),
    array("type" => "close"),
);

function gp_add_admin() {

    global $themename, $dirname, $shortname, $options;

    if (isset($_GET['page']) && $_GET['page'] == basename(__FILE__)) {

        if (isset($_REQUEST['action']) && 'save' == $_REQUEST['action']) {

            foreach ($options as $value) {
                update_option($value['id'], $_REQUEST[$value['id']]);
            }

            foreach ($options as $value) {
                if (isset($_REQUEST[$value['id']])) {
                    update_option($value['id'], $_REQUEST[$value['id']]);
                } else {
                    delete_option($value['id']);
                }
            }

            header("Location: themes.php?page=theme-options.php&saved=true");
            die;
        } else if (isset($_REQUEST['action']) && 'reset' == $_REQUEST['action']) {

            foreach ($options as $value) {
                delete_option($value['id']);
            }

            header("Location: themes.php?page=theme-options.php&reset=true");
            die;
        } else if (isset($_REQUEST['action']) && 'export' == $_REQUEST['action'])
            export_settings();
        else if (isset($_REQUEST['action']) && 'import' == $_REQUEST['action'])
            import_settings();
    }

    add_theme_page(__('Theme Options', 'gp_lang'), __('Theme Options', 'gp_lang'), 'manage_options', basename(__FILE__), 'gp_admin');
}

function gp_admin() {

    global $themename, $dirname, $shortname, $options;

    if (isset($_REQUEST['saved']) && $_REQUEST['saved'])
        echo '<div id="message" class="updated"><p><strong>' . __('Options Saved', 'gp_lang') . '</strong></p></div>';
    if (isset($_REQUEST['reset']) && $_REQUEST['reset'])
        echo '<div id="message" class="updated"><p><strong>' . __('Options Reset', 'gp_lang') . '</strong></p></div>';
    ?>

    <!--Begin Theme Wrapper-->
    <div id="theme-options-wrapper" class="wrap">

    <?php screen_icon('options-general'); ?>
        <h2><?php _e('Theme Options', 'gp_lang'); ?></h2>

        <div id="message" class="error">

            <p><?php _e('Need help? First check the', 'gp_lang'); ?> <a href="http://ghostpool.com/help/<?php echo $dirname; ?>/help.html" target="_blank"><?php _e('help file', 'gp_lang'); ?></a><?php _e(', then visit the', 'gp_lang'); ?> <a href="http://ghostpool.com/support" target="_blank"><?php _e('support forum', 'gp_lang'); ?></a>.</p>

            <p><?php _e('Keep up to date with the latest theme updates and news from GhostPool.com by following me on Twitter <a href="http://twitter.com/ghostpool" target="_blank">@ghostpool</a>.', 'gp_lang'); ?></p>

            <p><?php _e('If you like my work take a look at my other themes in my <a href="http://www.themeforest.net/user/GhostPool/portfolio?ref=GhostPool" target="_blank">portfolio</a>.', 'gp_lang'); ?></p>

            <p class="textright"><a href="#TB_inline?height=300&amp;width=500&amp;inlineId=import_export" title="<?php _e('Import/Export Theme Options', 'gp_lang'); ?>" class="thickbox" onclick="return false;"><?php _e('Import/Export Theme Options', 'gp_lang'); ?></a></p>

        </div>

        <div id="import_export" class="hide-if-js">

            <h3><?php _e('Import Theme Options', 'gp_lang'); ?></h3>
            <div class="option-desc"><?php _e('If you have a back up of your theme options you can import them below.', 'gp_lang'); ?></div>

            <form method="post" enctype="multipart/form-data">
                <p class="submit"><input type="file" name="file" id="file" />
                    <input type="submit" name="import" value="<?php _e('Upload', 'gp_lang'); ?>" /></p>
                <input type="hidden" name="action" value="import" />
            </form>

            <div class="divider"></div>

            <h3><?php _e('Export Theme Options', 'gp_lang'); ?></h3>
            <div class="option-desc"><?php _e('If you want to create a back up of all your theme options click the Export button below (will only back up your theme options and not your post/page/images data).', 'gp_lang'); ?></div>

            <form method="post">
                <p class="submit"><input name="export" type="submit" value="<?php _e('Export Theme Settings', 'gp_lang'); ?>" /></p>
                <input type="hidden" name="action" value="export" />
            </form>	

        </div>

        <form method="post">

            <div class="submit">	
                <input name="save" type="submit" value="<?php _e('Save Changes', 'gp_lang'); ?>" />
                <input type="hidden" name="action" value="save" />
            </div>

            <div id="panels">


    <?php
    foreach ($options as $value) {
        switch ($value['type']) {
            case "open":
                ?>

                <?php
                break;
            case "title":
                ?>

                            <div class="panel" id="<?php echo $value['name']; ?>">


                <?php
                break;
            case "header":
                ?>

                                <div class="option option-header">
                <?php if ($value['name']) { ?><h3><?php echo $value['name']; ?></h3><?php } ?>
                <?php if ($value['desc']) { ?><div class="option-desc"><?php echo $value['desc']; ?></div><?php } ?>
                                </div>


                <?php
                break;
            case "close":
                ?>

                            </div>
                            <!--End Panel-->


                <?php
                break;
            case "divider":
                ?>

                            <div class="divider"></div>


                <?php
                break;
            case "clear":
                ?>

                            <div class="clear"></div>


                <?php
                break;
            case 'text':
                ?>

                <?php if ($value['name']) { ?><h3><?php echo $value['name']; ?></h3><?php } ?>
                            <div class="option"<?php if ($value['style']) { ?> style="<?php echo $value['style']; ?>"<?php } ?><?php if ($value['style']) { ?> style="<?php echo $value['style']; ?>"<?php } ?>>
                                <input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (get_option($value['id']) != "") {
                    echo get_option($value['id']);
                } else {
                    echo $value['std'];
                } ?>" size="<?php if ($value['size'] == "small") { ?>3<?php } else { ?>40<?php } ?>" /><?php if ($value['details']) { ?> <span><?php echo $value['details']; ?></span>&nbsp;<?php } ?>
                <?php if ($value['desc']) { ?><div class="option-desc"><?php echo $value['desc']; ?></div><?php } ?>
                            </div>


                <?php
                break;
            case 'upload_image':
                ?>

                <?php if ($value['name']) { ?><h3><?php echo $value['name']; ?></h3><?php } ?>
                            <div class="option"<?php if ($value['style']) { ?> style="<?php echo $value['style']; ?>"<?php } ?>>
                                <input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="text" size="40" class="upload" value="<?php echo get_option($value['id']); ?>" />
                                <input type="button" class="upload-image-button button" value="<?php _e('Upload', 'gp_lang'); ?>" />
                <?php if ($value['desc']) { ?><div class="option-desc"><?php echo $value['desc']; ?></div><?php } ?>
                            </div>


                <?php
                break;
            case 'upload_video':
                ?>

                <?php if ($value['name']) { ?><h3><?php echo $value['name']; ?></h3><?php } ?>
                            <div class="option"<?php if ($value['style']) { ?> style="<?php echo $value['style']; ?>"<?php } ?>>
                                <input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="text" size="40" class="upload" value="<?php echo get_option($value['id']); ?>" />
                                <input type="button" class="upload-video-button button" value="<?php _e('Upload', 'gp_lang'); ?>" />
                <?php if ($value['desc']) { ?><div class="option-desc"><?php echo $value['desc']; ?></div><?php } ?>
                            </div>


                <?php
                break;

            case 'textarea':
                ?>

                <?php if ($value['name']) { ?><h3><?php echo $value['name']; ?></h3><?php } ?>
                            <div class="option"<?php if ($value['style']) { ?> style="<?php echo $value['style']; ?>"<?php } ?>>
                                <textarea name="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" cols="70" rows="<?php if ($value['size'] == "large") { ?>50<?php } else { ?>10<?php } ?>"><?php if (get_option($value['id']) != "") {
                    echo stripslashes(get_option($value['id']));
                } else {
                    echo $value['std'];
                } ?></textarea>
                <?php if ($value['desc']) { ?><div class="option-desc"><?php echo $value['desc']; ?></div><?php } ?>
                            </div>


                <?php
                break;
            case 'select':
                ?>

                <?php if ($value['name']) { ?><h3><?php echo $value['name']; ?></h3><?php } ?>
                            <div class="option"<?php if ($value['style']) { ?> style="<?php echo $value['style']; ?>"<?php } ?>>
                                <select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"><?php foreach ($value['options'] as $key => $option) { ?><option value="<?php echo $key; ?>" <?php if (get_option($value['id']) == $key) {
                        echo ' selected="selected"';
                    } ?>><?php echo $option; ?></option><?php } ?></select>
                <?php if ($value['desc']) { ?><div class="option-desc"><?php echo $value['desc']; ?></div><?php } ?>
                            </div>


                <?php
                break;
            case 'taxonomy_select':
                ?>

                <?php if ($value['name']) { ?><h3><?php echo $value['name']; ?></h3><?php } ?>
                            <div class="option"<?php if ($value['style']) { ?> style="<?php echo $value['style']; ?>"<?php } ?>>
                <?php $terms = get_terms('slide_categories', 'hide_empty=0'); ?>
                                <select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"><option value=''><?php _e('None', 'gp_lang'); ?></option><?php foreach ($terms as $term): ?><option value="<?php echo $term->slug; ?>" <?php if (get_option($value['id']) == $term->slug) {
                        echo ' selected="selected"';
                    } ?>><?php echo $term->name; ?></option><?php endforeach; ?></select>
                <?php if ($value['desc']) { ?><div class="option-desc"><?php echo $value['desc']; ?></div><?php } ?>
                            </div>	


                <?php
                break;
            case "checkbox":
                ?>


                <?php if ($value['name']) { ?><h3><?php echo $value['name']; ?></h3><?php } ?>
                            <div class="option<?php if ($value['extras'] == "multi") { ?> multi-checkbox<?php } ?>">
                <?php if (get_option($value['id'])) {
                    $checked = "checked=\"checked\"";
                } else {
                    $checked = "";
                } ?><input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> />
                <?php if ($value['desc']) { ?><div class="option-desc"><?php echo $value['desc']; ?></div><?php } ?>
                            </div>


                <?php
                break;
            case "radio":
                ?>

                <?php if ($value['name']) { ?><h3><?php echo $value['name']; ?></h3><?php } ?>
                            <div class="option"<?php if ($value['style']) { ?> style="<?php echo $value['style']; ?>"<?php } ?>>
                <?php
                foreach ($value['options'] as $key => $option) {
                    $radio_setting = get_option($value['id']);
                    if ($radio_setting != '') {
                        if ($key == get_option($value['id'])) {
                            $checked = "checked=\"checked\"";
                        } else {
                            $checked = "";
                        }
                    } else {
                        if ($key == $value['std']) {
                            $checked = "checked=\"checked\"";
                        } else {
                            $checked = "";
                        }
                    }
                    ?>
                                    <div class="radio-buttons">
                                        <input type="radio" name="<?php echo $value['id']; ?>" id="<?php echo $value['id'] . $key; ?>" value="<?php echo $key; ?>" <?php echo $checked; ?> /><label for="<?php echo $value['id'] . $key; ?>"><?php echo $option; ?></label>
                                    </div>	
                <?php } ?>
                                <div class="clear"></div>
                <?php if ($value['desc']) { ?><div class="option-desc"><?php echo $value['desc']; ?></div><?php } ?>
                            </div>


                <?php
                break;
            case "colorpicker":
                ?>

                <?php if ($value['name']) { ?><h3><?php echo $value['name']; ?></h3><?php } ?>
                            <div class="option option-colorpicker"<?php if ($value['style']) { ?> style="<?php echo $value['style']; ?>"<?php } ?>>
                                <div class="section">
                                    <div class="element">
                                        <script type="text/javascript">
                                            jQuery(document).ready(function($){  
                                                $("#<?php echo $value['id']; ?>").ColorPicker({
                                                    onSubmit: function(hsb, hex, rgb){
                                                        $("#<?php echo $value['id']; ?>").val("#"+hex);
                                                    },
                                                    onBeforeShow: function (){
                                                        $(this).ColorPickerSetColor(this.value);
                                                        return false;
                                                    },
                                                    onChange: function (hsb, hex, rgb){
                                                        $("#cp_<?php echo $value['id']; ?> div").css({"backgroundColor":"#"+hex, "backgroundImage": "none", "borderColor":"#"+hex});
                                                        $("#cp_<?php echo $value['id']; ?>").prev("input").attr("value", "#"+hex);
                                                    }
                                                })	
                                                .bind('keyup', function(){
                                                    $(this).ColorPickerSetColor(this.value);
                                                });
                                            });
                                        </script>
                                        <input type="text" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php if (get_option($value['id']) != "") {
                    echo get_option($value['id']);
                } else {
                    echo $value['std'];
                } ?>" class="cp_input" />
                                        <div id="cp_<?php echo $value['id']; ?>" class="cp_box">
                                            <div style="background-color:<?php if (get_option($value['id']) != "") {
                    echo get_option($value['id']);
                } else {
                    echo '#fff';
                } ?>;<?php if (get_option($value['id']) != "") {
                    echo 'background-image:none; border-color:' . get_option($value['id']) . ';';
                } ?>"> 
                                            </div>
                                        </div> 
                                    </div>
                                    <div class="clear"></div>
                <?php if ($value['desc']) { ?><div class="option-desc"><?php echo $value['desc']; ?></div><?php } ?>
                                </div>
                            </div>


                <?php
                break;
            case "import_export":
                ?>

                    </form>

                    <div class="option"<?php if ($value['style']) { ?> style="<?php echo $value['style']; ?>"<?php } ?>>

                        <h3><?php _e('Import Theme Settings', 'gp_lang'); ?></h3>
                        <div class="option-desc"><?php _e('If you have a back up of your theme settings you can import them below.', 'gp_lang'); ?></div>

                        <form method="post" enctype="multipart/form-data">
                            <p><input type="file" name="file" id="file" />
                                <input type="submit" name="import" value="<?php _e('Upload', 'gp_lang'); ?>" /></p>
                            <input type="hidden" name="action" value="import" />
                        </form>

                    </div>

                    <div class="divider"></div>

                    <div class="option submit">

                        <h3><?php _e('Export Theme Settings', 'gp_lang'); ?></h3>
                        <div class="option-desc"><?php _e('If you want to create a back up of all your theme settings click the Export button below (his option only backs up your theme settings and not your post/page data).', 'gp_lang'); ?></div>

                        <form method="post">
                            <p><input name="export" type="submit" value="<?php _e('Export Theme Settings', 'gp_lang'); ?>" /></p>
                            <input type="hidden" name="action" value="export" />
                        </form>	

                    </div>

                <?php
                break;
        }
    }
    ?>

    </div>

    <div class="submit">

        <input name="save" type="submit" value="<?php _e('Save Changes', 'gp_lang'); ?>" />
        <input type="hidden" name="action" value="save" />

    </form>

    <form method="post" onSubmit="if(confirm('<?php _e('Are you sure you want to reset all the theme options&#63;', 'gp_lang'); ?>')) return true; else return false;">	
        <input name="reset" type="submit" value="<?php _e('Reset', 'gp_lang'); ?>" />
        <input type="hidden" name="action" value="reset" />			
    </form>

    </div>

    </div>
    <!--End Theme Wrapper-->


<?php
}

if (function_exists('wp_enqueue_style')) {
    if (is_admin() && $pagenow == "themes.php") {

        function gp_admin_scripts() {
            wp_enqueue_style('thickbox');
            wp_enqueue_style('admin', get_template_directory_uri() . '/lib/admin/css/admin.css');
            wp_enqueue_script('jquery-ui-core');
            wp_enqueue_script('jquery-ui-sortable');
            wp_enqueue_script('media-upload');
            wp_enqueue_script('thickbox');
            wp_enqueue_script('tabs', get_template_directory_uri() . '/lib/admin/scripts/jquery.tabs.js', array('jquery'));
            wp_deregister_script('colorpicker');
            wp_enqueue_script('colorpicker', get_template_directory_uri() . '/lib/admin/scripts/jquery.color.picker.js', array('jquery'));
            wp_enqueue_script('custom', get_template_directory_uri() . '/lib/admin/scripts/custom.js', array('media-upload'));
        }

        add_action('admin_print_scripts', 'gp_admin_scripts');
    }
}

add_action('admin_menu', 'gp_add_admin');

// Export Theme Settings
function export_settings() {
    global $options;
    header("Cache-Control: public, must-revalidate");
    header("Pragma: hack");
    header("Content-Type: text/plain");
    header('Content-Disposition: attachment; filename="theme-options-' . date("dMy") . '.dat"');
    foreach ($options as $value)
        $theme_settings[$value['id']] = get_option($value['id']);
    echo serialize($theme_settings);
}

// Import Theme Settings
function import_settings() {
    global $options;
    if ($_FILES["file"]["error"] > 0) {
        echo "Error: " . $_FILES["file"]["error"] . "<br />";
    } else {
        $rawdata = file_get_contents($_FILES["file"]["tmp_name"]);
        $theme_settings = unserialize($rawdata);
        foreach ($options as $value) {
            if ($theme_settings[$value['id']]) {
                update_option($value['id'], $theme_settings[$value['id']]);
                $$value['id'] = $theme_settings[$value['id']];
            } else {
                if ($value['type'] == 'checkbox_multiple')
                    $$value['id'] = array();
                else
                    $$value['id'] = $value['std'];
            }
        }
    }
    if (in_array('cacheStyles', get_option('theme_misc')))
        cache_settings();
    wp_redirect($_SERVER['PHP_SELF'] . '?page=theme-options.php');
}

// Help File Info
if (is_admin() && $pagenow == "themes.php") {
    add_action('admin_head', 'set_theme_help_text');

    function set_theme_help_text() {
        global $_registered_pages, $dirname;
        if (!empty($_registered_pages))
            foreach (array_keys($_registered_pages)as $hook)
                add_contextual_help($hook, '<p><a href="http://ghostpool.com/help/' . $dirname . '/help.html" target="_blank">' . __('Help File', 'gp_lang') . '</a></p><p><a href="http://ghostpool.com/support" target="_blank">' . __('Support Forum', 'gp_lang') . '</a></p><p><a href="http://ghostpool.com/help/' . $dirname . '/changelog.html" target="_blank">' . __('Changelog', 'gp_lang') . '</a></p>');
    }

}
?>