<?php
/**
 * Framework options.
 * @package RetroTale
 * @since RetroTale 1.0.0
*/   
$retrotale_fonts = array(
			'default' => 'default',	
			'Abel' => 'Abel',			
			'Aclonica' => 'Aclonica',
			'Actor' => 'Actor',
			'Adamina' => 'Adamina',
			'Aldrich' => 'Aldrich',
			'Alice' => 'Alice',
			'Alike' => 'Alike',
			'Allan' => 'Allan',
			'Allerta' => 'Allerta',
      'Amarante' => 'Amarante',
			'Amaranth' => 'Amaranth',
      'Andika' => 'Andika',
			'Antic' => 'Antic',
			'Arimo' => 'Arimo',	
			'Artifika' => 'Artifika',
			'Arvo' => 'Arvo',
			'Brawler' => 'Brawler',
			'Buda' => 'Buda',	
      'Butcherman' => 'Butcherman',	
			'Cantarell' => 'Cantarell',	
      'Cherry Swash' => 'Cherry Swash',				
			'Chivo' => 'Chivo',			
			'Coda' => 'Coda',	
      'Concert One' => 'Concert One',		
			'Copse' => 'Copse',
			'Corben' => 'Corben',
			'Cousine' => 'Cousine',			
			'Coustard' => 'Coustard',
			'Covered By Your Grace' => 'Covered By Your Grace',
			'Crafty Girls' => 'Crafty Girls',
			'Crimson Text' => 'Crimson Text',
			'Crushed' => 'Crushed',
			'Cuprum' => 'Cuprum',
			'Damion' => 'Damion',
			'Dancing Script' => 'Dancing Script',
			'Dawning of a New Day' => 'Dawning of a New Day',
			'Days One' => 'Days One',
			'Delius' => 'Delius',
			'Delius Swash Caps' => 'Delius Swash Caps',
			'Delius Unicase' => 'Delius Unicase',
			'Didact Gothic' => 'Didact Gothic',
			'Dorsa' => 'Dorsa',
			'Droid Sans' => 'Droid Sans',
			'Droid Sans Mono' => 'Droid Sans Mono',
      'Droid Serif' => 'Droid Serif',
			'EB Garamond' => 'EB Garamond',
			'Expletus Sans' => 'Expletus Sans',
			'Fanwood Text' => 'Fanwood Text',
			'Federo' => 'Federo',
			'Fontdiner Swanky' => 'Fontdiner Swanky',
			'Forum' => 'Forum',
			'Francois One' => 'Francois One',
			'Gentium Basic' => 'Gentium Basic',
			'Gentium Book Basic' => 'Gentium Book Basic',
			'Geo' => 'Geo',
			'Geostar' => 'Geostar',
			'Geostar Fill' => 'Geostar Fill',
      'Gilda Display' => 'Gilda Display',
			'Give You Glory' => 'Give You Glory',
			'Gloria Hallelujah' => 'Gloria Hallelujah',
			'Goblin One' => 'Goblin One',
			'Goudy Bookletter 1911' => 'Goudy Bookletter 1911',
			'Gravitas One' => 'Gravitas One',
			'Gruppo' => 'Gruppo',
			'Hammersmith One' => 'Hammersmith One',
			'Holtwood One SC' => 'Holtwood One SC',
			'Homemade Apple' => 'Homemade Apple',
			'Inconsolata' => 'Inconsolata',
			'Indie Flower' => 'Indie Flower',
      'IM Fell English' => 'IM Fell English',
			'Irish Grover' => 'Irish Grover',
			'Irish Growler' => 'Irish Growler',
			'Istok Web' => 'Istok Web',
			'Judson' => 'Judson',
			'Julee' => 'Julee',
			'Just Another Hand' => 'Just Another Hand',
			'Just Me Again Down Here' => 'Just Me Again Down Here',
			'Kameron' => 'Kameron',
			'Kelly Slab' => 'Kelly Slab',
			'Kenia' => 'Kenia',
			'Kranky' => 'Kranky',
			'Kreon' => 'Kreon',
			'Kristi' => 'Kristi',
			'La Belle Aurore' => 'La Belle Aurore',
      'Lato' => 'Lato',
			'League Script' => 'League Script',
			'Leckerli One' => 'Leckerli One',
			'Lekton' => 'Lekton',
      'Lily Script One' => 'Lily Script One',
			'Limelight' => 'Limelight',
			'Lobster' => 'Lobster',
			'Lobster Two' => 'Lobster Two',
			'Lora' => 'Lora',
			'Love Ya Like A Sister' => 'Love Ya Like A Sister',
			'Loved by the King' => 'Loved by the King',
      'Lovers Quarrel' => 'Lovers Quarrel',
			'Luckiest Guy' => 'Luckiest Guy',
			'Maiden Orange' => 'Maiden Orange',
			'Mako' => 'Mako',
			'Marvel' => 'Marvel',
			'Maven Pro' => 'Maven Pro',
			'Meddon' => 'Meddon',
			'MedievalSharp' => 'MedievalSharp',
      'Medula One' => 'Medula One',
			'Megrim' => 'Megrim',
			'Merienda One' => 'Merienda One',
			'Merriweather' => 'Merriweather',
			'Metrophobic' => 'Metrophobic',
			'Michroma' => 'Michroma',
			'Miltonian Tattoo' => 'Miltonian Tattoo',
			'Miltonian' => 'Miltonian',
			'Modern Antiqua' => 'Modern Antiqua',
			'Molengo' => 'Molengo',
      'Monofett' => 'Monofett',
			'Monoton' => 'Monoton',
      'Montaga' => 'Montaga',
			'Montez' => 'Montez',
      'Montserrat' => 'Montserrat',
			'Mountains of Christmas' => 'Mountains of Christmas',
			'Muli Light' => 'Muli Light',
			'Muli Regular' => 'Muli Regular',
			'Neucha' => 'Neucha',
			'Neuton' => 'Neuton',
			'News Cycle' => 'News Cycle',
			'Nixie One' => 'Nixie One',
			'Nobile' => 'Nobile',
			'Nova Cut' => 'Nova Cut',
			'Nova Flat' => 'Nova Flat',
			'Nova Mono' => 'Nova Mono',
			'Nova Oval' => 'Nova Oval',
			'Nova Round' => 'Nova Round',
			'Nova Script' => 'Nova Script',
			'Nova Slim' => 'Nova Slim',
			'Nova Square' => 'Nova Square',
			'Numans' => 'Numans',
			'Nunito' => 'Nunito',
      'Open Sans' => 'Open Sans',
			'Oswald' => 'Oswald',
			'Over the Rainbow' => 'Over the Rainbow',
			'Ovo' => 'Ovo',
			'Pacifico' => 'Pacifico',
			'Passero One' => 'Passero One',
			'Patrick Hand' => 'Patrick Hand',
			'Paytone One' => 'Paytone One',
			'Permanent Marker' => 'Permanent Marker',
			'Philosopher' => 'Philosopher',
			'Play' => 'Play',
			'Playfair Display' => 'Playfair Display',
			'Podkova' => 'Podkova',
			'Poller One' => 'Poller One',
			'Pompiere' => 'Pompiere',
			'Prata' => 'Prata',
			'Prociono' => 'Prociono',
			'PT Sans' => 'PT Sans',
			'PT Sans Caption' => 'PT Sans Caption',
			'PT Sans Narrow' => 'PT Sans Narrow',
			'PT Serif' => 'PT Serif',
			'PT Serif Caption' => 'PT Serif Caption',
			'Puritan' => 'Puritan',
			'Quattrocento' => 'Quattrocento',
			'Quattrocento Sans' => 'Quattrocento Sans',
			'Questrial' => 'Questrial',
			'Radley' => 'Radley',
			'Raleway' => 'Raleway', 
      'Rationale' => 'Rationale',
			'Redressed' => 'Redressed',
      'Reenie Beanie' => 'Reenie Beanie', 
      'Roboto' => 'Roboto',
      'Roboto Condensed' => 'Roboto Condensed',
			'Rock Salt' => 'Rock Salt',
			'Rochester' => 'Rochester',
			'Rokkitt' => 'Rokkitt',
			'Rosario' => 'Rosario',
			'Ruslan Display' => 'Ruslan Display',
      'Sancreek' => 'Sancreek',
			'Sansita One' => 'Sansita One',
			'Schoolbell' => 'Schoolbell',
			'Shadows Into Light' => 'Shadows Into Light',
			'Shanti' => 'Shanti',
			'Short Stack' => 'Short Stack',
			'Sigmar One' => 'Sigmar One',
			'Six Caps' => 'Six Caps',
			'Slackey' => 'Slackey',
			'Smokum' => 'Smokum',
			'Smythe' => 'Smythe',
			'Sniglet' => 'Sniglet',
			'Snippet' => 'Snippet',
			'Sorts Mill Goudy' => 'Sorts Mill Goudy',
			'Special Elite' => 'Special Elite',
			'Spinnaker' => 'Spinnaker',
			'Stardos Stencil' => 'Stardos Stencil',
			'Sue Ellen Francisco' => 'Sue Ellen Francisco',
			'Sunshiney' => 'Sunshiney',
			'Swanky and Moo Moo' => 'Swanky and Moo Moo',
			'Syncopate' => 'Syncopate',
			'Tangerine' => 'Tangerine',
			'Tenor Sans' => ' Tenor Sans',
			'Terminal Dosis Light' => 'Terminal Dosis Light',
			'Tinos' => 'Tinos',
			'Tulpen One' => 'Tulpen One',
			'Ubuntu' => 'Ubuntu',
			'Ultra' => 'Ultra',
      'UnifrakturCook' => 'UnifrakturCook',
			'UnifrakturMaguntia' => 'UnifrakturMaguntia',
      'Unkempt' => 'Unkempt',
			'Unna' => 'Unna',
			'Varela' => 'Varela',
			'Varela Round' => 'Varela Round',
			'Vibur' => 'Vibur',
			'Vidaloka' => 'Vidaloka',
			'Volkhov' => 'Volkhov',
			'Vollkorn' => 'Vollkorn',
			'Voltaire' => 'Voltaire',
			'VT323' => 'VT323',
			'Waiting for the Sunrise' => 'Waiting for the Sunrise',
			'Wallpoet' => 'Wallpoet',
			'Walter Turncoat' => 'Walter Turncoat',
			'Wire One' => 'Wire One',
			'Yanone Kaffeesatz' => 'Yanone Kaffeesatz',
			'Yellowtail' => 'Yellowtail',
			'Yeseva One' => 'Yeseva One',
			'Zeyada' => 'Zeyada');
      
add_action('admin_init', 'retrotale_options_setup');
function retrotale_options_setup() {
global $retrotale_themename, $retrotale_shortname, $retrotale_fonts;
$retrotale_options = array (

array( "name" => __( 'RetroTale Options' , 'retrotale' ),
	"type" => "title"),

array( "type" => "open"),

// Start Tabs
array( "name" => "Start Tabs",
		"type" => "tabs-open",
		"icon" => "layout"),

	// Home
	array( "name" => __( '<i class="icon_house" aria-hidden="true"></i>Welcome' , 'retrotale' ),
			"id" => "tab_menu_0",
			"type" => "tab",
			"icon" => "layout",
			"class" => " selected first"),
	
	// General Settings
	array( "name" => __( '<i class="icon_key" aria-hidden="true"></i>General Settings' , 'retrotale' ),
			"id" => "tab_menu_1",
			"type" => "tab",
			"icon" => "layout",
			"class" => ""),
      
	// Header Settings
	array( "name" => __( '<i class="icon_cog" aria-hidden="true"></i>Header' , 'retrotale' ),
			"id" => "tab_menu_2",
			"type" => "tab",
			"icon" => "layout",
			"class" => ""),
      
	// Posts/Pages Settings
	array( "name" => __( '<i class="icon_documents" aria-hidden="true"></i>Posts/Pages' , 'retrotale' ),
			"id" => "tab_menu_3",
			"type" => "tab",
			"icon" => "layout",
			"class" => ""),
      
  // Post Entries Settings
	array( "name" => __( '<i class="icon_tags" aria-hidden="true"></i>Post Entries' , 'retrotale' ),
			"id" => "tab_menu_4",
			"type" => "tab",
			"icon" => "layout",
			"class" => ""),
      
	// Fonts
	array( "name" => __( '<i class="icon_pens" aria-hidden="true"></i>Fonts' , 'retrotale' ),
			"id" => "tab_menu_6",
			"type" => "tab",
			"icon" => "layout",
			"class" => ""),
	
	// Other settings Tab
	array( "name" => __( '<i class="icon_tools" aria-hidden="true"></i>Other Settings' , 'retrotale' ),
			"type" => "tab",
			"id" => "tab_menu_8",
			"class" => ""),
      
  // Get Premium
	array( "name" => __( '<i class="icon_cart" aria-hidden="true"></i>GET PREMIUM' , 'retrotale' ),
			"type" => "tab",
			"id" => "tab_menu_9",
			"class" => ""),
	

// General setting Tab
array( "name" => "Close Tabs",
		"type" => "tabs-close",
		"icon" => "layout"),

array( "name" => "Start Container",
		"type" => "container-open",
		"icon" => "layout"),

// Home Container 0
array( "name" => "tab_content_0",
		"type" => "tabcontent-open",
		"display" => "block",
		"icon" => "layout"),

	// Home
	array( "name" => __( 'Welcome to RetroTale!' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
	
	array("name" => __( 'First of all, I would like to thank you for choosing RetroTale! I firmly believe that you will be satisfied with this theme.' , 'retrotale' ),
		"type" => "infotext"),
	
		array( "name" => __( 'About RetroTale' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
	
	array("name" => __( 'RetroTale is an easily customizable retro-styled theme which can be used for your Blog, Magazine, Business, eCommerce or Events website. It is a fully responsive and Retina ready theme that allows for easy viewing on any device.' , 'retrotale' ),
		"type" => "infotext"),

array( "name" => "tab_content_0",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close Home

// General setting Tab Container 1
array( "name" => "tab_content_1",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),

	// General settings
	array( "name" => __( 'General Settings' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),		

	array( "name" => __( 'Color Scheme' , 'retrotale' ),
		"desc" => __( 'Select one of the preconfigured Color Schemes. In Premium version, you can build your custom color scheme.' , 'retrotale' ),
		"id" => $retrotale_shortname."_css",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Red (default)' => __( 'Red (default)' , 'retrotale' ),
							'Blue' => __( 'Blue' , 'retrotale' ),
              'Green' => __( 'Green' , 'retrotale' ),),
		"type" => "select"),
    
  array( "name" => __( 'Layout Style' , 'retrotale' ),
		"desc" => __( 'Choose the layout style of your website.' , 'retrotale' ),
		"id" => $retrotale_shortname."_layout",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Boxed' => __( 'Boxed' , 'retrotale' ),
							'Wide' => __( 'Wide' , 'retrotale' )),
		"type" => "select"),
    
	array( "name" => __( 'Favicon URL' , 'retrotale' ),
		"desc" => __( 'Upload your own favicon image (16x16px) or directly insert its URL. You can create your own favicon using <a href="http://www.favicon.cc/" target="_blank">Favicon generator</a>.' , 'retrotale' ),
		"id" => $retrotale_shortname."_favicon_url",
		"type" => "upload-favicon",
		"std" => ""),
    
  array( "name" => __( 'Display Breadcrumb Navigation' , 'retrotale' ),
		"desc" => __( 'Set the Breadcrumb Navigation to be visible or not. The Breadcrumb NavXT plugin has to be installed for displaying it.' , 'retrotale' ),
		"id" => $retrotale_shortname."_display_breadcrumb",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'retrotale' ),
							'Hide' => __( 'Hide' , 'retrotale' )),
		"type" => "select"),
    
  array( "name" => __( 'Display Scroll-top Button' , 'retrotale' ),
		"desc" => __( 'Set the scroll-top button to be visible or not.' , 'retrotale' ),
		"id" => $retrotale_shortname."_display_scroll_top",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'retrotale' ),
							'Hide' => __( 'Hide' , 'retrotale' )),
		"type" => "select"),
    
	array( "name" => __( 'Sidebar Settings' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Display Sidebar on Posts/Pages' , 'retrotale' ),
		"desc" => __( 'Set the right sidebar to be visible or not on the single posts and pages.' , 'retrotale' ),
		"id" => $retrotale_shortname."_display_sidebar",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'retrotale' ),
							'Hide' => __( 'Hide' , 'retrotale' )),
		"type" => "select"),
    
  array( "name" => __( 'Display Sidebar on Archives' , 'retrotale' ),
		"desc" => __( 'Set the right sidebar to be visible or not on the archive pages (including all archives, homepage and search results).' , 'retrotale' ),
		"id" => $retrotale_shortname."_display_sidebar_archives",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'retrotale' ),
							'Hide' => __( 'Hide' , 'retrotale' )),
		"type" => "select"),	
    
array( "name" => "tab_content_1",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close General settings
   	

// Open Header settings
  array( "name" => "tab_content_2",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),
    
	array( "name" => __( 'Header Settings' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Display Header Image' , 'retrotale' ),
		"desc" => __( 'Set the <a href="themes.php?page=custom-header">Header Image</a> to be visible on all pages or only on the homepage.' , 'retrotale' ),
		"id" => $retrotale_shortname."_display_header_image",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Everywhere' => __( 'Everywhere' , 'retrotale' ),
							'Only on Homepage' => __( 'Only on Homepage' , 'retrotale' )),
		"type" => "select"),
    
	array( "name" => __( 'Logo URL' , 'retrotale' ),
		"desc" => __( 'Upload your own logo in .jpg, .gif or .png format or directly insert its URL. The logo will automatically replace the Site Title.' , 'retrotale' ),
		"id" => $retrotale_shortname."_logo_url",
		"type" => "upload-logo",
		"std" => ""),
    
  array( "name" => __( 'Display Site Description' , 'retrotale' ),
		"desc" => __( 'Set the Site Description to be visible or not in your header.' , 'retrotale' ),
		"id" => $retrotale_shortname."_display_site_description",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'retrotale' ),
							'Hide' => __( 'Hide' , 'retrotale' )),
		"type" => "select"),
    
  array( "name" => __( 'Fixed Menu' , 'retrotale' ),
		"desc" => __( 'Select whether to enable or disable fixing of the Main Header Menu at the top of the browser window.' , 'retrotale' ),
		"id" => $retrotale_shortname."_fixed_menu",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Enable' => __( 'Enable' , 'retrotale' ),
							'Disable' => __( 'Disable' , 'retrotale' )),
		"type" => "select"),
    
  // Contact information  
	array( "name" => __( 'Contact Information' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Postal Address' , 'retrotale' ),
	  "desc" => __( 'Fill here your postal address to be displayed in header.' , 'retrotale' ),
		"id" => $retrotale_shortname."_header_address",
		"type" => "text",
		"std" => ""),
    
  array( "name" => __( 'Email Address' , 'retrotale' ),
	  "desc" => __( 'Fill here your email address to be displayed in header.' , 'retrotale' ),
		"id" => $retrotale_shortname."_header_email",
		"type" => "text",
		"std" => ""),
    
  array( "name" => __( 'Phone Number' , 'retrotale' ),
	  "desc" => __( 'Fill here your phone number to be displayed in header.' , 'retrotale' ),
		"id" => $retrotale_shortname."_header_phone",
		"type" => "text",
		"std" => ""),
    
  array( "name" => __( 'Skype Name' , 'retrotale' ),
	  "desc" => __( 'Fill here your Skype name to be displayed in header.' , 'retrotale' ),
		"id" => $retrotale_shortname."_header_skype",
		"type" => "text",
		"std" => ""),
    
array( "name" => "tab_content_2",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close Header settings
 
  
// Open Posts/Pages settings
  array( "name" => "tab_content_3",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),
    
	array( "name" => __( 'Post Settings' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Display Featured Image on single posts' , 'retrotale' ),
		"desc" => __( 'Set the Featured Image to be visible or not on the single posts.' , 'retrotale' ),
		"id" => $retrotale_shortname."_display_image_post",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'retrotale' ),
							'Hide' => __( 'Hide' , 'retrotale' )),
		"type" => "select"),
    
  array( "name" => __( 'Display Meta Box on single posts' , 'retrotale' ),
		"desc" => __( 'Set the Meta Box (with publish date, author, category and tags) to be visible or not on the single posts.' , 'retrotale' ),
		"id" => $retrotale_shortname."_display_meta_post",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'retrotale' ),
							'Hide' => __( 'Hide' , 'retrotale' )),
		"type" => "select"),
    
	array( "name" => __( 'Next/Previous Post Navigation' , 'retrotale' ),
		"desc" => __( 'This feature gives the possibility to easy navigate between the posts in chronological order.' , 'retrotale' ),
		"id" => $retrotale_shortname."_next_preview_post",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'retrotale' ),
							'Hide' => __( 'Hide' , 'retrotale' )),
		"type" => "select"),

// PAGES
	array( "name" => __( 'Page Settings' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Display Featured Image on pages' , 'retrotale' ),
		"desc" => __( 'Set the Featured Image to be visible or not on pages.' , 'retrotale' ),
		"id" => $retrotale_shortname."_display_image_page",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'retrotale' ),
							'Hide' => __( 'Hide' , 'retrotale' )),
		"type" => "select"),
    
array( "name" => "tab_content_3",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close Posts/Pages settings


// Open Post Entries settings
array( "name" => "tab_content_4",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"), 
       
  array( "name" => __( 'Post Entries Settings' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Post Entries Format' , 'retrotale' ),
		"desc" => __( 'Set the way how the post entries to be displayed.' , 'retrotale' ),
		"id" => $retrotale_shortname."_post_entry_format",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'One Column' => __( 'One Column' , 'retrotale' ),
              'Grid - Masonry' => __( 'Grid - Masonry' , 'retrotale' )),
		"type" => "select"),
    
  array( "name" => __( 'Display Meta Box on Post Entries' , 'retrotale' ),
		"desc" => __( 'Set the Meta Box (with publish date, author, comments, category and tags) to be visible or not on the post entries.' , 'retrotale' ),
		"id" => $retrotale_shortname."_display_meta_post_entry",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'retrotale' ),
							'Hide' => __( 'Hide' , 'retrotale' )),
		"type" => "select"), 
    
  array( "name" => __( 'Content/Excerpt Displaying' , 'retrotale' ),
		"desc" => __( 'Select whether you want to display the full content or the post excerpts on your archive pages (including all archives, homepage and search results).' , 'retrotale' ),
		"id" => $retrotale_shortname."_content_archives",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Excerpt' => __( 'Excerpt' , 'retrotale' ),
							'Content' => __( 'Content' , 'retrotale' )),
		"type" => "select"),
    
  array( "name" => __( 'Excerpt Length' , 'retrotale' ),
	"desc" => __( 'Set here the number of words you wish to display in the excerpt.' , 'retrotale' ),
		"id" => $retrotale_shortname."_excerpt_length",
		"type" => "text",
		"std" => "40"),
    
  array( "name" => __( 'Blog Page' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
  
  array( "name" => __( 'Latest Posts section headline' , 'retrotale' ),
	"desc" => __( 'Fill here the headline of the Latest Posts section displayed on your Blog page.' , 'retrotale' ),
		"id" => $retrotale_shortname."_latest_posts_headline",
		"type" => "text",
		"std" => __( 'Latest Posts' , 'retrotale' )),    

array( "name" => "tab_content_4",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close Post Entries settings


// Open Fonts
array( "name" => "tab_content_6",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),

	array( "name" => __( 'Font Settings' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Character Set' , 'retrotale' ),
		"desc" => __( 'Select your character set. Note: Not all fonts support all character sets.' , 'retrotale' ),
		"id" => $retrotale_shortname."_character_set",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'latin' => __( 'Latin' , 'retrotale' ),
              'latin-ext' => __( 'Latin Extended' , 'retrotale' ),
              'cyrillic' => __( 'Cyrillic' , 'retrotale' ),
              'cyrillic-ext' => __( 'Cyrillic Extended' , 'retrotale' ),
              'greek' => __( 'Greek' , 'retrotale' ),
              'greek-ext' => __( 'Greek Extended' , 'retrotale' ),
              'vietnamese' => __( 'Vietnamese' , 'retrotale' ) ),
		"type" => "select"),

	array( "name" => __( 'Body font' , 'retrotale' ),
		"desc" => __( 'Select the main body font.' , 'retrotale' ),
		"id" => $retrotale_shortname."_body_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $retrotale_fonts,
		"type" => "select"),	

	array( "name" => __( 'Site Title font' , 'retrotale' ),
		"desc" => __( 'Select a font for your Site Title in header.' , 'retrotale' ),
		"id" => $retrotale_shortname."_headings_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $retrotale_fonts,
		"type" => "select"),	

	array( "name" => __( 'Site Description font' , 'retrotale' ),
		"desc" => __( 'Select a font for your Site Description in header.' , 'retrotale' ),
		"id" => $retrotale_shortname."_description_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $retrotale_fonts,
		"type" => "select"),
    
  array( "name" => __( 'Page/Post Headlines font' , 'retrotale' ),
		"desc" => __( 'Select a font for page/post headlines (h1 - h6).' , 'retrotale' ),
		"id" => $retrotale_shortname."_headline_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $retrotale_fonts,
		"type" => "select"),
    
  array( "name" => __( 'Post Entry Headline font' , 'retrotale' ),
		"desc" => __( 'Select a font for Post Entry headlines displayed on index/archive/search pages.' , 'retrotale' ),
		"id" => $retrotale_shortname."_postentry_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $retrotale_fonts,
		"type" => "select"),
    
  array( "name" => __( 'Sidebar/Footer Widget Headlines font' , 'retrotale' ),
		"desc" => __( 'Select a font for Sidebar/Footer Widget headlines.' , 'retrotale' ),
		"id" => $retrotale_shortname."_sidebar_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $retrotale_fonts,
		"type" => "select"),
    
	array( "name" => __( 'Main Header Menu font' , 'retrotale' ),
		"desc" => __( 'Select a font for your Main Header Menu.' , 'retrotale' ),
		"id" => $retrotale_shortname."_menu_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $retrotale_fonts,
		"type" => "select"),

array( "name" => "tab_content_6",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close fonts


// Open Other settings
array( "name" => "tab_content_8",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),

	array( "name" => __( 'Other Settings' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Custom CSS' , 'retrotale' ),
		"desc" => __( 'Fill here your own cascading style sheet information (CSS).<br />Example: #content p {font-size: 15px;} #sidebar p {font-size: 14px;}' , 'retrotale' ),
		"id" => $retrotale_shortname."_own_css",
		"type" => "textarea",
		"std" => ""),

array( "name" => "tab_content_8",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close Other settings

// Open Get Premium
array( "name" => "tab_content_9",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),

	array( "name" => __( 'Get RetroTale Premium Version' , 'retrotale' ),
		"type" => "heading",
		"icon" => "layout"),
		
  array( "type" => "infotext",
		"name" => __( 'If you would like to purchase the RetroTale Premium Version, you can do so on <a href="http://www.tomastoman.cz/downloads/retrotale/" target="_blank">Developers Official Website</a>.' , 'retrotale' )),
    
  array( "type" => "infotext",
		"name" => __( '<strong>What the RetroTale Premium Version offers in addition?</strong><br />
    - Support for Drag-and-drop Page Builder with 37 in-built widgets for creating custom page layouts<br />
    - 7 pre-defined color schemes (Blue, Gold, Gray, Green, Red, Teal and Violet)<br />
    - Unlimited ability to create custom Color scheme (unlimited color settings)<br />
    - Ability to set different Header Images for the individual pages/posts/categories<br />
    - Ability to set different Header Slideshows for the individual pages/posts<br />
    - Ability to set different Sidebars/Footers for the individual pages/posts<br />
    - Image Slideshow with 3 different templates<br />
    - Font size settings<br />
    - Related Posts box on the single posts<br />
    - 5 dynamic Hover effects for the Post Thumbnails (Black-White, Fade, Focus, Shadow and Tilt)<br />
    - 6 Custom widgets for displaying the latest posts from the specific categories (as a Column, Grid, List, Slider, Thumbnails and by Default - One Column)<br />
    - Custom Tab widget (displays popular posts, recent posts, comments and tags in tabbed format)<br />
    - Info-Box Custom widget (displays a text box with an icon)<br />
    - Social Network Profile links in header (69 pre-defined icons)<br />
    - Facebook Like Box Custom widget<br />
    - Twitter Following Custom widget<br />
    - Integrated Facebook/Twitter/Google+1 share buttons on posts/pages/post entries<br />
    - Integrated automatic Sitemap generator with advanced options<br />
    - Custom Shortcodes for adding buttons, images, slideshows, tables and highlighted texts anywhere you like<br />
    - Custom Shortcode for displaying Google maps<br />
    - Custom Shortcode for displaying specific listing of posts anywhere you like<br />
    - 6 Custom Page templates<br />
    - Ability to add custom JavaScript code' , 'retrotale' )),
    
  array( "name" => "tab_content_9",
		"type" => "tabcontent-close",
		"icon" => "layout"),
    
// Close Get Premium

array("name" => "Close Container",
		"type" => "container-close",
		"icon" => "layout"),

array( "type" => "close") 
); return $retrotale_options; } 

add_action('admin_head', 'retrotale_admin_css');

function retrotale_admin_css() { ?>
     
	<script language="JavaScript">
		jQuery.noConflict();
		jQuery(document).ready(function($) {
	
		$(".tabs .tab[id^=tab_menu]").click(function() {
			var curMenu=$(this);
			$(".tabs .tab[id^=tab_menu]").removeClass("selected");
			curMenu.addClass("selected");
	
			var index=curMenu.attr("id").split("tab_menu_")[1];
			$(".curvedContainer .tabcontent").css("display","none");
			$(".curvedContainer #tab_content_"+index).css("display","block");
		});
	});
	</script>

<?php }
function retrotale_add_admin() {
	global $retrotale_themename, $retrotale_shortname;
  $retrotale_options = retrotale_options_setup();
	if ( isset ( $_GET['page'] ) && ( $_GET['page'] == basename(__FILE__) ) ) {
		if ( isset ($_REQUEST['action']) && ( 'save' == $_REQUEST['action'] ) ){
      if ( !empty($_POST) && check_admin_referer('retrotale_save_options','retrotale_save_options_field' ) ) {
			foreach ( $retrotale_options as $value ) {
				if ( array_key_exists('id', $value) ) {
					if ( isset( $_REQUEST[ $value['id'] ] ) ) {
            $retrotale_options_array = array( 'retrotale_css' => sanitize_text_field( $_REQUEST[ 'retrotale_css' ] ),
              'retrotale_layout' => sanitize_text_field( $_REQUEST[ 'retrotale_layout' ] ),
              'retrotale_favicon_url' => esc_url_raw( $_REQUEST[ 'retrotale_favicon_url' ] ),
              'retrotale_display_breadcrumb' => sanitize_text_field( $_REQUEST[ 'retrotale_display_breadcrumb' ] ),
              'retrotale_display_scroll_top' => sanitize_text_field( $_REQUEST[ 'retrotale_display_scroll_top' ] ),
              'retrotale_display_sidebar' => sanitize_text_field( $_REQUEST[ 'retrotale_display_sidebar' ] ),
              'retrotale_display_sidebar_archives' => sanitize_text_field( $_REQUEST[ 'retrotale_display_sidebar_archives' ] ),
              'retrotale_display_header_image' => sanitize_text_field( $_REQUEST[ 'retrotale_display_header_image' ] ),
              'retrotale_logo_url' => esc_url_raw( $_REQUEST[ 'retrotale_logo_url' ] ),
              'retrotale_display_site_description' => sanitize_text_field( $_REQUEST[ 'retrotale_display_site_description' ] ),
              'retrotale_fixed_menu' => sanitize_text_field( $_REQUEST[ 'retrotale_fixed_menu' ] ),
              'retrotale_header_address' => sanitize_text_field( $_REQUEST[ 'retrotale_header_address' ] ),
              'retrotale_header_email' => sanitize_text_field( $_REQUEST[ 'retrotale_header_email' ] ),
              'retrotale_header_phone' => sanitize_text_field( $_REQUEST[ 'retrotale_header_phone' ] ),
              'retrotale_header_skype' => sanitize_text_field( $_REQUEST[ 'retrotale_header_skype' ] ),
              'retrotale_display_image_post' => sanitize_text_field( $_REQUEST[ 'retrotale_display_image_post' ] ),
              'retrotale_display_meta_post' => sanitize_text_field( $_REQUEST[ 'retrotale_display_meta_post' ] ),
              'retrotale_next_preview_post' => sanitize_text_field( $_REQUEST[ 'retrotale_next_preview_post' ] ),
              'retrotale_display_image_page' => sanitize_text_field( $_REQUEST[ 'retrotale_display_image_page' ] ),
              'retrotale_post_entry_format' => sanitize_text_field( $_REQUEST[ 'retrotale_post_entry_format' ] ),
              'retrotale_display_meta_post_entry' => sanitize_text_field( $_REQUEST[ 'retrotale_display_meta_post_entry' ] ),
              'retrotale_content_archives' => sanitize_text_field( $_REQUEST[ 'retrotale_content_archives' ] ),
              'retrotale_excerpt_length' => sanitize_text_field( $_REQUEST[ 'retrotale_excerpt_length' ] ),
              'retrotale_latest_posts_headline' => sanitize_text_field( $_REQUEST[ 'retrotale_latest_posts_headline' ] ),
              'retrotale_character_set' => sanitize_text_field( $_REQUEST[ 'retrotale_character_set' ] ),
              'retrotale_body_google_fonts' => sanitize_text_field( $_REQUEST[ 'retrotale_body_google_fonts' ] ), 
              'retrotale_headings_google_fonts' => sanitize_text_field( $_REQUEST[ 'retrotale_headings_google_fonts' ] ),
              'retrotale_description_google_fonts' => sanitize_text_field( $_REQUEST[ 'retrotale_description_google_fonts' ] ),
              'retrotale_headline_google_fonts' => sanitize_text_field( $_REQUEST[ 'retrotale_headline_google_fonts' ] ),
              'retrotale_postentry_google_fonts' => sanitize_text_field( $_REQUEST[ 'retrotale_postentry_google_fonts' ] ),
              'retrotale_sidebar_google_fonts' => sanitize_text_field( $_REQUEST[ 'retrotale_sidebar_google_fonts' ] ),
              'retrotale_menu_google_fonts' => sanitize_text_field( $_REQUEST[ 'retrotale_menu_google_fonts' ] ),
              'retrotale_own_css' => sanitize_text_field( $_REQUEST[ 'retrotale_own_css' ] ) );
						update_option( 'retrotale_options', $retrotale_options_array  );
					}
					else {
						delete_option( 'retrotale_options' );
					}
				}
			}
			header("Location: themes.php?page=".basename(__FILE__)."&saved=true");
		}
    }else if ( isset ($_REQUEST['action']) && ( 'reset' == $_REQUEST['action'] ) ) {
			foreach ($retrotale_options as $value) {
				if ( array_key_exists('id', $value) ) {
					delete_option( 'retrotale_options' );
				}
			}
			header("Location: themes.php?page=".basename(__FILE__)."&reset=true");
		}
	}
	add_theme_page($retrotale_themename." Options", __( 'Theme Options' , 'retrotale' ), 'edit_theme_options', 'fw-options.php', 'retrotale_admin', '', '1');
}

$retrotale_options_db = get_option('retrotale_options');

function retrotale_admin() {
	global $retrotale_themename, $retrotale_shortname, $retrotale_themever, $fwver, $retrotale_manualurl; 
  $retrotale_options = retrotale_options_setup();
	if (isset($_REQUEST["saved"]) && !empty($_REQUEST["saved"])) echo '<div id="message" class="updated fade"><p><strong>'.$retrotale_themename.' '.__( 'settings saved.', 'retrotale' ).'</strong></p></div>';
	if (isset($_REQUEST["reset"]) && !empty($_REQUEST["reset"])) echo '<div id="message" class="error fade"><p><strong>'.$retrotale_themename.' '.__( 'settings reset.', 'retrotale' ).'</strong></p></div>';
  wp_enqueue_style('retrotale-framework-style', get_template_directory_uri() . '/functions/be/css.css');
  wp_enqueue_style('retrotale-framework-icons', get_template_directory_uri() . '/css/elegantfont.css');
?>

	<div id="wrap_fm"><!-- [ Header ]-->
		<div class="header_fm">
			<div class="logo_fm"><?php _e( 'Theme Options' , 'retrotale' ); ?></div>
			<div class="frame_vers_fm">
				<div class="theme_version_fm"><?php echo $retrotale_themename;?> <strong><?php echo $retrotale_themever;?></strong></div>
				<div class="clear"></div>
			</div>
		</div>

		<!-- [ Top Menu ]-->
		<div class="top_menu_fm">
			<a target="_blank" class="doc_fm" href="<?php echo esc_url($retrotale_manualurl); ?>"><?php _e( 'Documentation' , 'retrotale' ); ?></a><a target="_blank" class="support_fm" href="http://www.tomastoman.cz/support"><?php _e( 'Support' , 'retrotale' ); ?></a><a target="_blank" class="premium_fm" href="http://www.tomastoman.cz/downloads/retrotale/"><?php _e( 'Get Premium Version' , 'retrotale' ); ?></a>
		</div>

	<form method="post">
	<?php 
	foreach ($retrotale_options as $value) {
	switch ( $value['type'] ) {
	case "open":
	?> 
	<?php break; case "title": ?> 

	<!-- [ Body ]-->
	<div id="wrap_body_fm">
	<div class="tabscontainer">


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

	<!-- start form -->
	<div class="col_100">
		<div class="col_50">
			<input id="submit" class="button-primary" name="save" type="submit" value="<?php _e( 'Save all changes' , 'retrotale' ); ?>" /> <input type="hidden" name="action" value="save" />
      <?php wp_nonce_field( 'retrotale_save_options','retrotale_save_options_field' ); ?>
			</form>
		</div>
	 	<div class="col_50">
		 	<form method="post">
				<input class="reset button-primary" name="reset" type="submit" value="<?php _e( 'Reset all settings' , 'retrotale' ); ?>" />
				<input type="hidden" name="action" value="reset" />
			</form>
		</div>	
		<div class="clear"></div>
	</div>
	<!-- end form -->
</div></div>

<?php break;case 'text': ?>
<?php global $retrotale_options_db; ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
	<div class="input_fm"><input name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" type="<?php echo esc_attr($value['type']); ?>" value="<?php if ( $retrotale_options_db[$value['id']] != "" ) { echo esc_attr($retrotale_options_db[$value['id']]); } else { echo esc_attr($value['std']); } ?>" /></div>
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>
  
<?php break;case 'url': ?>
<?php global $retrotale_options_db; ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
	<div class="input_fm"><input name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" type="text" value="<?php if ( $retrotale_options_db[$value['id']] != "" ) { echo esc_url($retrotale_options_db[$value['id']]); } else { echo esc_url($value['std']); } ?>" /></div>
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>
  
<?php break;case 'upload-favicon': ?>
<?php global $retrotale_options_db; ?>
<?php wp_enqueue_media();
wp_enqueue_script('retrotale_my-admin-js-favicon', get_template_directory_uri() . '/js/custom-uploader-favicon.js', array('jquery')); ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
  <input class="upload_image" type="text" name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" value="<?php if ( $retrotale_options_db[$value['id']] != "") { echo esc_url($retrotale_options_db[$value['id']]); } else { echo esc_url($value['std']); } ?>" /> 
  <input class="upload_image_button button" type="button" value="<?php _e( 'Upload Image' , 'retrotale' ); ?>" />
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>
  
<?php break;case 'upload-logo': ?>
<?php global $retrotale_options_db; ?>
<?php wp_enqueue_script('retrotale_my-admin-js-logo', get_template_directory_uri() . '/js/custom-uploader-logo.js', array('jquery')); ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
  <input class="upload_logo" type="text" name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" value="<?php if ( $retrotale_options_db[$value['id']] != "") { echo esc_url($retrotale_options_db[$value['id']]); } else { echo esc_url($value['std']); } ?>" /> 
  <input class="upload_logo_button button" type="button" value="<?php _e( 'Upload Image' , 'retrotale' ); ?>" />
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>

<?php break; case 'textarea':?>
<?php global $retrotale_options_db; ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
	<div class="input_fm"><textarea name="<?php echo esc_attr($value['id']); ?>" style="height: 100px;" type="<?php echo esc_attr($value['type']); ?>" cols="" rows=""><?php if ( $retrotale_options_db[$value['id']] != "") { echo esc_attr($retrotale_options_db[$value['id']]); } else { echo esc_attr($value['std']); } ?></textarea></div>
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>

<?php break; case 'select': ?>
<?php global $retrotale_options_db; ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
	<div class="input_fm"><select name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>"><?php foreach ($value['options'] as $key => $option) { ?>
  <option value="<?php echo esc_attr($key); ?>" <?php if ($retrotale_options_db[$value['id']] == $key) { selected( $retrotale_options_db[$value['id']], $key, true ); } elseif ($key == $value['std']) { selected( $retrotale_options_db[$value['id']], $key, true ); } ?>><?php echo esc_html($option); ?></option>
<?php } ?>
	</select></div>
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>
	
	<?php break; case "heading":?>
	<h1><?php echo $value['name']; ?></h1>
	
	<?php break; case "subheader":?>
	<div class="name_fm"><?php echo $value['name']; ?></div>
	
  <?php break; case "infotext":?>
	<div class="infotext"><?php echo $value['name']; ?></div>
	
	<?php break; case "paragraph":?>
	<div class="desc_fm"><small><?php echo $value['name']; ?></small></div>
  	
	<?php break; case "tabs-open":?>	
	<div class="tabs">
	
	<?php break; case "tabs-close":?>	
	</div>	
	
	<?php break; case "tab":?>	
	<div class="tab<?php echo $value['class']; ?>" id="<?php echo $value['id']; ?>">
	<div class="link"><?php echo $value['name']; ?></div>
	<div class="arrow"></div>
	</div>
 	
 	<?php break; case "container-open":?>	
	<div class="curvedContainer">
 	
 	<?php break; case "container-close":?>	
	</div>	
 	
	<?php break; case "tabcontent-open":?>	
	<div class="tabcontent" id="<?php echo $value['name']; ?>" style="display:<?php echo $value['display']; ?>" >
	
	<?php break; case "tabcontent-close":?>	
	</div>	
 	
<?php break;

}
}
?>

<?php
}

add_action('admin_menu', 'retrotale_add_admin'); ?>