<?php
add_action('ff_framework_loaded', 'create_metabox_data');

function create_metabox_data() {
	$sidebarCollection = new fSidebarCollection();
	
	$ms = metaboxDataStore::getInstance();
	// addOption( $type, $id, $title, $description, $std, $values = null )	
/******************************************************************************/
/*----------------------------------------------------------------------------*/
/* Post Type ALL ( slider, video, etc )
/*----------------------------------------------------------------------------*/
/******************************************************************************/			
	$ms->startMetabox(__('Post Featured Image Type', ffgtd()), metaboxDataStore::METABOX_POST_TYPE_POST, metaboxDataStore::METABOX_CONTEXT_SIDE );
		$ms->addOption('select', 'featured_image_type', '', '', 'lightbox', array(
			array('name'=> __('Open in Lightbox', ffgtd()), 'value'=>'lightbox'),
			array('name'=> __('Standard Image', ffgtd()), 'value'=>'std'),
			array('name'=> __('Video', ffgtd()), 'value'=>'video'),
		));
		$ms->addOption('text', 'featured_image_height', '', __('Set a Fixed Image Height (e.g., 100px)', ffgtd()), 0);
		$ms->addOption('text', 'featured_image_video_link','', __('Video Link', 'please paste video link from youtube / vimeo', ffgtd()), '');
	$ms->endMetabox();
	
	$ms->startMetabox(__('Post Featured Image Type', ffgtd()), metaboxDataStore::METABOX_POST_TYPE_PAGE, metaboxDataStore::METABOX_CONTEXT_SIDE );
	$ms->addOption('select', 'featured_image_type', '', '', 'lightbox', array(
			array('name'=> __('Open in Lightbox', ffgtd()), 'value'=>'lightbox'),
			array('name'=> __('Standard Image', ffgtd()), 'value'=>'std'),
			array('name'=> __('Video', ffgtd()), 'value'=>'video'),
	));
	
	$ms->addOption('text', 'featured_image_height', '', __('Set a Fixed Image Height (e.g., 100px)', ffgtd()), 0);
	$ms->addOption('text', 'featured_image_video_link', 'Video Link', __('please paste video link from youtube / vimeo', ffgtd()), '');
	$ms->endMetabox();

	$ms->startMetabox(__('Sidebar Settings', ffgtd()), metaboxDataStore::METABOX_POST_TYPE_POST, metaboxDataStore::METABOX_CONTEXT_ADVANCED );
	$ms->addOption('sidebar', 'fw_sidebar', __('Custom Sidebar Name', ffgtd()), __('Custom Sidebar Name', ffgtd()), 'default', $sidebarCollection->getSidebarsValueListCorrect() );
	$ms->addOption('select', 'fw_sidebar_position', __('Custom Sidebar Position', ffgtd()),'', 'default',
			array(
					array('name'=> 'Default', 'value'=>'default'),
					array('name'=> 'Right', 'value'=>'right'),
					array('name'=> 'None', 'value'=>'fullwidth'),
			));
	$ms->endMetabox();	
/******************************************************************************/
/*----------------------------------------------------------------------------*/
/* Page
/*----------------------------------------------------------------------------*/
/******************************************************************************/	
	
	$ms->startMetabox(__('Gallery Settings', ffgtd()), metaboxDataStore::METABOX_POST_TYPE_PAGE, metaboxDataStore::METABOX_CONTEXT_ADVANCED, array('page_template'=>array('gallery', 'gallery_fullwidth')) );
		$ms->addOption('select', 'gallery_columns', __('Number of Columns', ffgtd()), '', '3', array(
				array('name'=> '3', 'value'=>'3'),
				array('name'=> '4', 'value'=>'4'),
				array('name'=> '5', 'value'=>'5'),
		));
	$ms->endMetabox();
	
	$ms->startMetabox(__('Gallery Settings', ffgtd()), metaboxDataStore::METABOX_POST_TYPE_PAGE, metaboxDataStore::METABOX_CONTEXT_ADVANCED, array('page_template'=>array('gallery', 'gallery_fullwidth')) );
		$ms->addOption('gallery', 'gallery_slider', '', '', '');
	$ms->endMetabox();

	
	
/******************************************************************************/
/*----------------------------------------------------------------------------*/
/* Portfolio
/*----------------------------------------------------------------------------*/
/******************************************************************************/
	$ms->startMetabox(__('Featured Image Type', ffgtd()), metaboxDataStore::METABOX_POST_TYPE_PORTFOLIO, metaboxDataStore::METABOX_CONTEXT_SIDE );
	$ms->addOption('select', 'featured_image_type', '', '', 'lightbox', array(
			array('name'=> __('Open in Lightbox', ffgtd()), 'value'=>'lightbox'),
			array('name'=> __('Standard Image', ffgtd()), 'value'=>'std'),
			array('name'=> __('Video', ffgtd()), 'value'=>'video'),
	));
	$ms->addOption('text', 'featured_image_height', '', __('Set a Fixed Image Height (e.g., 100px)', ffgtd()), 0);
	$ms->addOption('text', 'featured_image_video_link', 'Video Link', __('please paste video link from youtube / vimeo', ffgtd()), '');
	$ms->endMetabox();
	
	$ms->startMetabox(__('Sidebar Settings', ffgtd()), metaboxDataStore::METABOX_POST_TYPE_PORTFOLIO, metaboxDataStore::METABOX_CONTEXT_ADVANCED, array('page_template'=>array('page-gallery', 'page-sidebar', 'page-contact')) );
		$ms->addOption('sidebar', 'fw_sidebar', __('Custom Sidebar Name', ffgtd()), __('Custom Sidebar Name', ffgtd()), 'default', $sidebarCollection->getSidebarsValueListCorrect() );
		$ms->addOption('select', 'fw_sidebar_position', __('Custom Sidebar Position', ffgtd()), __('Custom Sidebar Position', ffgtd()), 'right', 
			array(
				array('name'=> 'Default', 'value'=>'default'),
				array('name'=> 'Right', 'value'=>'right'),
				array('name'=> 'None', 'value'=>'fullwidth'),
		));
	$ms->endMetabox();
	
/******************************************************************************/	
/******************************************************************************/
/*----------------------------------------------------------------------------*/
/* Gallery
/*----------------------------------------------------------------------------*/
/******************************************************************************/	
	/*$ms->startMetabox(__('Gallery', ffgtd()), metaboxDataStore::METABOX_POST_TYPE_ALL, metaboxDataStore::METABOX_CONTEXT_ADVANCED );
		$ms->addOption('gallery', 'gallery_slider', '', '', '');
	$ms->endMetabox();
	*/
	
/*	$ms->startMetabox('title pico', 'page');
	$ms->addOption('text', 'ide_pico4', 'titulek', 'popisek', 'hovno');
	$ms->addOption('text', 'ide_pico5', 'titulek', 'popisek', 'hovno');
	$ms->addOption('text', 'ide_pico6', 'titulek', 'popisek', 'hovno');
	$ms->endMetabox();*/
	
	$mm = new metaBoxManager();
}