Your IP : 216.73.216.95


Current Path : /var/test/www/ya/wp-content/plugins/meanthemes-tools/include/
Upload File :
Current File : /var/test/www/ya/wp-content/plugins/meanthemes-tools/include/custom-meta.php

<?php
// Useful global constants
define( 'MT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );




/**
 * Include and setup custom metaboxes and fields.
 *
 * @category MeanThemes Tools
 * @package  Metaboxes
 * @license  http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
 * @link     https://github.com/WebDevStudios/CMB2
 */

add_filter( 'cmb2_admin_init', 'meanthemes_tools_metaboxes' );
/**
 * Define the metabox and field configurations.
 *
 * @param  array $meta_boxes
 * @return array
 */
function meanthemes_tools_metaboxes() {

	// Get theme name
	$theme_name = wp_get_theme();



	// Simple Homepage items
	$simple_homepage_items = "";
	if ( $theme_name == "Preface" || $theme_name == "Preface Child" || $theme_name == "Preface Extended (Child Theme)" || ( current_theme_supports( 'meanthemes_simple_homepage_items' ) ) ) {
		$simple_homepage_items = true;
	}


	// Get Page list as an array

	$page_args = array(
		'sort_order' => 'ASC',
		'sort_column' => 'post_title',
		'hierarchical' => 1,
		'exclude' => '',
		'include' => '',
		'meta_key' => '',
		'meta_value' => '',
		'authors' => '',
		'child_of' => 0,
		'parent' => -1,
		'exclude_tree' => '',
		'number' => '',
		'offset' => 0,
		'post_type' => 'page',
		'post_status' => 'publish'
	);
	$pages = get_pages($page_args);

	$page_select = array();
	if ( !empty( $pages ) ) {
			// Set a None value
			$page_select[ 'default' ] = 'None';

			foreach ( $pages as $page ) {
				$page_select[ $page->ID ] = $page->post_title;
			}

	}


	if ( is_admin() ) {

		// Enqueue Admin JS and CSS
		wp_enqueue_script( 'post-formats', MT_PLUGIN_URL . 'js/cmb-layout.js', array( 'jquery' ), '3.0.0', null );
		wp_enqueue_style( 'mt-cmb-styles', MT_PLUGIN_URL . 'css/mt-cmb-layout.css', array(), '3.0.0', 'screen' );
	}


	if ( ( current_theme_supports( 'meanthemes_aesop_support' ) ) ) {

		if ( ! function_exists( 'is_plugin_active' ) ) {
			require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
		}
		if ( is_plugin_active( 'aesop-story-engine/aesop-core.php' ) ) {

					$aesop_options_prefix = '_mt_';

					$mt_tools_aesop_support = new_cmb2_box( array(
						'id'         => 'meanthemes_tools_custom_meta_aesop',
						'title'      => __( 'Aesop Story Engine Settings', 'meanthemes' ),
						'object_types'  => array( 'post','page' ),
						'context'    => 'normal',
						'priority'   => 'high',
						'show_names' => true,
					) );

					$mt_tools_aesop_support->add_field( array(
						'name'    => __( 'Enable Aesop on this post/page', 'meanthemes' ),
						'id'      => $aesop_options_prefix . 'aesop_override',
						'type'    => 'select',
						'default'	=> '3',
						'options' => array(
							'3'     => __( 'Using Global Option', 'meanthemes' ),
							'off'     => __( 'No', 'meanthemes' ),
							'on'     => __( 'Yes', 'meanthemes' ),
						),
					) );
			}

	}


		if ( ( current_theme_supports( 'meanthemes_ambient_video_support' ) ) ) {

			// Ambient video settings
			$prefix = '_single_';

			$mt_tools_ambient_video = new_cmb2_box( array(
				'id'         => 'meanthemes_tools_custom_meta_ambient_video',
				'title'      => __( 'Ambient Video Settings', 'meanthemes' ),
				'object_types'  => array( 'post', ),
				'context'    => 'normal',
				'priority'   => 'high',
				'show_names' => true,
			) );

			$mt_tools_ambient_video->add_field( array(
				'name' => __( 'WebM ambient video file', 'meanthemes' ),
				'desc' => __( 'This will be autoplayed and have sound off.', 'meanthemes' ),
				'id'   => $prefix . 'format_video_webm',
				'type' => 'file',
			) );

			$mt_tools_ambient_video->add_field( array(
				'name' => __( 'mp4 ambient video file', 'meanthemes' ),
				'desc' => __( 'This will be autoplayed and have sound off.', 'meanthemes' ),
				'id'   => $prefix . 'format_video_mp4',
				'type' => 'file',
			) );

			$mt_tools_ambient_video->add_field( array(
				'name' => __( 'Unmute video', 'meanthemes' ),
				'desc' => __( 'Ticking this will turn the sound on for the video.', 'meanthemes' ),
				'id'   => '_mt_hero_video_unmuted',
				'type' => 'checkbox',
			) );

		}

	// Single Post Formats
	$prefix = '_single_';

	$mt_tools_post_formats = new_cmb2_box( array(
		'id'            => 'meanthemes_tools_custom_meta',
		'title'      => __( 'Additional Post Format Information', 'meanthemes' ),
		'object_types'  => array( 'post', ),
	) );

	$mt_tools_post_formats->add_field( array(
		'name' => __( 'Website URL', 'meanthemes' ),
		'desc' => __( 'Enter full URL in here including http://(s)', 'meanthemes' ),
		'id'   => $prefix . 'format_link_url',
		'type'       => 'text_url'
	) );

	$mt_tools_post_formats->add_field( array(
		'name' => __( 'Open link in the same window?', 'meanthemes' ),
		'desc' => __( 'Default is to open in a new window/tab', 'meanthemes' ),
		'id'   => $prefix . 'format_link_url_self',
		'type' => 'checkbox',
	) );

	$mt_tools_post_formats->add_field( array(
		'name' => __( 'Video Format embed code', 'meanthemes' ),
		'desc' => __( 'Copy your YouTube or Vimeo video embed code and paste it here. If the theme supports video covers then just insert the link and we will do the rest (Currently only Myth and Lore supports video covers).', 'meanthemes' ),
		'id'   => $prefix . 'format_video',
		'type' => 'textarea_code',
	) );

	$mt_tools_post_formats->add_field( array(
		'name' => __( 'Audio file', 'meanthemes' ),
		'desc' => __( 'Upload or select your MP3 here.', 'meanthemes' ),
		'id'   => $prefix . 'format_audio',
		'type' => 'file',
	) );

	$mt_tools_post_formats->add_field( array(
		'name' => __( 'Quote Source', 'meanthemes' ),
		'desc' => __( 'Enter the person who is quoted here (optional)', 'meanthemes' ),
		'id'   => $prefix . 'format_quote',
		'type' => 'text_medium',
	) );

	$mt_tools_post_formats->add_field( array(
		'name' => __( 'Quote URL', 'meanthemes' ),
		'desc' => __( 'Enter full URL in here including (optional)', 'meanthemes' ),
		'id'   => $prefix . 'format_quote_url',
		'type' => 'text_url',
	) );

	$mt_tools_post_formats->add_field( array(
		'name' => __( 'Status embed code', 'meanthemes' ),
		'desc' => __( 'Copy your Twitter or Facebook embed code and paste it here.<br><strong>Please note, this may not display on archive/homepage, please check your theme documentation for layout, also... Facebook statuses are not responsive yet!</strong>', 'meanthemes' ),
		'id'   => $prefix . 'format_status',
		'type' => 'textarea_code',
	) );



	// Font Awesome Icon list 4.7.0
	function meanthemes_tools_fa_icons_list(){
		$icon = array(
				'none' => 'No Icon',
				'fa-500px' => '500px',
				'fa-address-book-o' => 'address-book-o',
				'fa-address-book' => 'address-book',
				'fa-address-card-o' => 'address-card-o',
				'fa-address-card' => 'address-card',
				'fa-adjust' => 'adjust',
				'fa-adn' => 'adn',
				'fa-align-center' => 'align-center',
				'fa-align-justify' => 'align-justify',
				'fa-align-left' => 'align-left',
				'fa-align-right' => 'align-right',
				'fa-amazon' => 'amazon',
				'fa-ambulance' => 'ambulance',
				'fa-american-sign-language-interpreting' => 'american-sign-language-interpreting',
				'fa-anchor' => 'anchor',
				'fa-android' => 'android',
				'fa-angellist' => 'angellist',
				'fa-angle-double-down' => 'angle-double-down',
				'fa-angle-double-left' => 'angle-double-left',
				'fa-angle-double-right' => 'angle-double-right',
				'fa-angle-double-up' => 'angle-double-up',
				'fa-angle-down' => 'angle-down',
				'fa-angle-left' => 'angle-left',
				'fa-angle-right' => 'angle-right',
				'fa-angle-up' => 'angle-up',
				'fa-apple' => 'apple',
				'fa-archive' => 'archive',
				'fa-area-chart' => 'area-chart',
				'fa-arrow-circle-down' => 'arrow-circle-down',
				'fa-arrow-circle-left' => 'arrow-circle-left',
				'fa-arrow-circle-o-down' => 'arrow-circle-o-down',
				'fa-arrow-circle-o-left' => 'arrow-circle-o-left',
				'fa-arrow-circle-o-right' => 'arrow-circle-o-right',
				'fa-arrow-circle-o-up' => 'arrow-circle-o-up',
				'fa-arrow-circle-right' => 'arrow-circle-right',
				'fa-arrow-circle-up' => 'arrow-circle-up',
				'fa-arrow-down' => 'arrow-down',
				'fa-arrow-left' => 'arrow-left',
				'fa-arrow-right' => 'arrow-right',
				'fa-arrow-up' => 'arrow-up',
				'fa-arrows-alt' => 'arrows-alt',
				'fa-arrows-h' => 'arrows-h',
				'fa-arrows-v' => 'arrows-v',
				'fa-arrows' => 'arrows',
				'fa-assistive-listening-systems' => 'assistive-listening-systems',
				'fa-asterisk' => 'asterisk',
				'fa-at' => 'at',
				'fa-audio-description' => 'audio-description',
				'fa-backward' => 'backward',
				'fa-balance-scale' => 'balance-scale',
				'fa-ban' => 'ban',
				'fa-bandcamp' => 'bandcamp',
				'fa-bar-chart' => 'bar-chart',
				'fa-barcode' => 'barcode',
				'fa-bars' => 'bars',
				'fa-bath' => 'bath',
				'fa-battery-empty' => 'battery-empty',
				'fa-battery-full' => 'battery-full',
				'fa-battery-half' => 'battery-half',
				'fa-battery-quarter' => 'battery-quarter',
				'fa-battery-three-quarters' => 'battery-three-quarters',
				'fa-bed' => 'bed',
				'fa-beer' => 'beer',
				'fa-behance-square' => 'behance-square',
				'fa-behance' => 'behance',
				'fa-bell-o' => 'bell-o',
				'fa-bell-slash-o' => 'bell-slash-o',
				'fa-bell-slash' => 'bell-slash',
				'fa-bell' => 'bell',
				'fa-bicycle' => 'bicycle',
				'fa-binoculars' => 'binoculars',
				'fa-birthday-cake' => 'birthday-cake',
				'fa-bitbucket-square' => 'bitbucket-square',
				'fa-bitbucket' => 'bitbucket',
				'fa-black-tie' => 'black-tie',
				'fa-blind' => 'blind',
				'fa-bluetooth-b' => 'bluetooth-b',
				'fa-bluetooth' => 'bluetooth',
				'fa-bold' => 'bold',
				'fa-bolt' => 'bolt',
				'fa-bomb' => 'bomb',
				'fa-book' => 'book',
				'fa-bookmark-o' => 'bookmark-o',
				'fa-bookmark' => 'bookmark',
				'fa-braille' => 'braille',
				'fa-briefcase' => 'briefcase',
				'fa-btc' => 'btc',
				'fa-bug' => 'bug',
				'fa-building-o' => 'building-o',
				'fa-building' => 'building',
				'fa-bullhorn' => 'bullhorn',
				'fa-bullseye' => 'bullseye',
				'fa-bus' => 'bus',
				'fa-buysellads' => 'buysellads',
				'fa-calculator' => 'calculator',
				'fa-calendar-check-o' => 'calendar-check-o',
				'fa-calendar-minus-o' => 'calendar-minus-o',
				'fa-calendar-o' => 'calendar-o',
				'fa-calendar-plus-o' => 'calendar-plus-o',
				'fa-calendar-times-o' => 'calendar-times-o',
				'fa-calendar' => 'calendar',
				'fa-camera-retro' => 'camera-retro',
				'fa-camera' => 'camera',
				'fa-car' => 'car',
				'fa-caret-down' => 'caret-down',
				'fa-caret-left' => 'caret-left',
				'fa-caret-right' => 'caret-right',
				'fa-caret-square-o-down' => 'caret-square-o-down',
				'fa-caret-square-o-left' => 'caret-square-o-left',
				'fa-caret-square-o-right' => 'caret-square-o-right',
				'fa-caret-square-o-up' => 'caret-square-o-up',
				'fa-caret-up' => 'caret-up',
				'fa-cart-arrow-down' => 'cart-arrow-down',
				'fa-cart-plus' => 'cart-plus',
				'fa-cc-amex' => 'cc-amex',
				'fa-cc-diners-club' => 'cc-diners-club',
				'fa-cc-discover' => 'cc-discover',
				'fa-cc-jcb' => 'cc-jcb',
				'fa-cc-mastercard' => 'cc-mastercard',
				'fa-cc-paypal' => 'cc-paypal',
				'fa-cc-stripe' => 'cc-stripe',
				'fa-cc-visa' => 'cc-visa',
				'fa-cc' => 'cc',
				'fa-certificate' => 'certificate',
				'fa-chain-broken' => 'chain-broken',
				'fa-check-circle-o' => 'check-circle-o',
				'fa-check-circle' => 'check-circle',
				'fa-check-square-o' => 'check-square-o',
				'fa-check-square' => 'check-square',
				'fa-check' => 'check',
				'fa-chevron-circle-down' => 'chevron-circle-down',
				'fa-chevron-circle-left' => 'chevron-circle-left',
				'fa-chevron-circle-right' => 'chevron-circle-right',
				'fa-chevron-circle-up' => 'chevron-circle-up',
				'fa-chevron-down' => 'chevron-down',
				'fa-chevron-left' => 'chevron-left',
				'fa-chevron-right' => 'chevron-right',
				'fa-chevron-up' => 'chevron-up',
				'fa-child' => 'child',
				'fa-chrome' => 'chrome',
				'fa-circle-o-notch' => 'circle-o-notch',
				'fa-circle-o' => 'circle-o',
				'fa-circle-thin' => 'circle-thin',
				'fa-circle' => 'circle',
				'fa-clipboard' => 'clipboard',
				'fa-clock-o' => 'clock-o',
				'fa-clone' => 'clone',
				'fa-cloud-download' => 'cloud-download',
				'fa-cloud-upload' => 'cloud-upload',
				'fa-cloud' => 'cloud',
				'fa-code-fork' => 'code-fork',
				'fa-code' => 'code',
				'fa-codepen' => 'codepen',
				'fa-codiepie' => 'codiepie',
				'fa-coffee' => 'coffee',
				'fa-cog' => 'cog',
				'fa-cogs' => 'cogs',
				'fa-columns' => 'columns',
				'fa-comment-o' => 'comment-o',
				'fa-comment' => 'comment',
				'fa-commenting-o' => 'commenting-o',
				'fa-commenting' => 'commenting',
				'fa-comments-o' => 'comments-o',
				'fa-comments' => 'comments',
				'fa-compass' => 'compass',
				'fa-compress' => 'compress',
				'fa-connectdevelop' => 'connectdevelop',
				'fa-contao' => 'contao',
				'fa-copyright' => 'copyright',
				'fa-creative-commons' => 'creative-commons',
				'fa-credit-card-alt' => 'credit-card-alt',
				'fa-credit-card' => 'credit-card',
				'fa-crop' => 'crop',
				'fa-crosshairs' => 'crosshairs',
				'fa-css3' => 'css3',
				'fa-cube' => 'cube',
				'fa-cubes' => 'cubes',
				'fa-cutlery' => 'cutlery',
				'fa-dashcube' => 'dashcube',
				'fa-database' => 'database',
				'fa-deaf' => 'deaf',
				'fa-delicious' => 'delicious',
				'fa-desktop' => 'desktop',
				'fa-deviantart' => 'deviantart',
				'fa-diamond' => 'diamond',
				'fa-digg' => 'digg',
				'fa-dot-circle-o' => 'dot-circle-o',
				'fa-download' => 'download',
				'fa-dribbble' => 'dribbble',
				'fa-dropbox' => 'dropbox',
				'fa-drupal' => 'drupal',
				'fa-edge' => 'edge',
				'fa-eercast' => 'eercast',
				'fa-eject' => 'eject',
				'fa-ellipsis-h' => 'ellipsis-h',
				'fa-ellipsis-v' => 'ellipsis-v',
				'fa-empire' => 'empire',
				'fa-envelope-o' => 'envelope-o',
				'fa-envelope-open-o' => 'envelope-open-o',
				'fa-envelope-open' => 'envelope-open',
				'fa-envelope-square' => 'envelope-square',
				'fa-envelope' => 'envelope',
				'fa-envira' => 'envira',
				'fa-eraser' => 'eraser',
				'fa-etsy' => 'etsy',
				'fa-eur' => 'eur',
				'fa-exchange' => 'exchange',
				'fa-exclamation-circle' => 'exclamation-circle',
				'fa-exclamation-triangle' => 'exclamation-triangle',
				'fa-exclamation' => 'exclamation',
				'fa-expand' => 'expand',
				'fa-expeditedssl' => 'expeditedssl',
				'fa-external-link-square' => 'external-link-square',
				'fa-external-link' => 'external-link',
				'fa-eye-slash' => 'eye-slash',
				'fa-eye' => 'eye',
				'fa-eyedropper' => 'eyedropper',
				'fa-facebook-official' => 'facebook-official',
				'fa-facebook-square' => 'facebook-square',
				'fa-facebook' => 'facebook',
				'fa-fast-backward' => 'fast-backward',
				'fa-fast-forward' => 'fast-forward',
				'fa-fax' => 'fax',
				'fa-female' => 'female',
				'fa-fighter-jet' => 'fighter-jet',
				'fa-file-archive-o' => 'file-archive-o',
				'fa-file-audio-o' => 'file-audio-o',
				'fa-file-code-o' => 'file-code-o',
				'fa-file-excel-o' => 'file-excel-o',
				'fa-file-image-o' => 'file-image-o',
				'fa-file-o' => 'file-o',
				'fa-file-pdf-o' => 'file-pdf-o',
				'fa-file-powerpoint-o' => 'file-powerpoint-o',
				'fa-file-text-o' => 'file-text-o',
				'fa-file-text' => 'file-text',
				'fa-file-video-o' => 'file-video-o',
				'fa-file-word-o' => 'file-word-o',
				'fa-file' => 'file',
				'fa-files-o' => 'files-o',
				'fa-film' => 'film',
				'fa-filter' => 'filter',
				'fa-fire-extinguisher' => 'fire-extinguisher',
				'fa-fire' => 'fire',
				'fa-firefox' => 'firefox',
				'fa-first-order' => 'first-order',
				'fa-flag-checkered' => 'flag-checkered',
				'fa-flag-o' => 'flag-o',
				'fa-flag' => 'flag',
				'fa-flask' => 'flask',
				'fa-flickr' => 'flickr',
				'fa-floppy-o' => 'floppy-o',
				'fa-folder-o' => 'folder-o',
				'fa-folder-open-o' => 'folder-open-o',
				'fa-folder-open' => 'folder-open',
				'fa-folder' => 'folder',
				'fa-font-awesome' => 'font-awesome',
				'fa-font' => 'font',
				'fa-fonticons' => 'fonticons',
				'fa-fort-awesome' => 'fort-awesome',
				'fa-forumbee' => 'forumbee',
				'fa-forward' => 'forward',
				'fa-foursquare' => 'foursquare',
				'fa-free-code-camp' => 'free-code-camp',
				'fa-frown-o' => 'frown-o',
				'fa-futbol-o' => 'futbol-o',
				'fa-gamepad' => 'gamepad',
				'fa-gavel' => 'gavel',
				'fa-gbp' => 'gbp',
				'fa-genderless' => 'genderless',
				'fa-get-pocket' => 'get-pocket',
				'fa-gg-circle' => 'gg-circle',
				'fa-gg' => 'gg',
				'fa-gift' => 'gift',
				'fa-git-square' => 'git-square',
				'fa-git' => 'git',
				'fa-github-alt' => 'github-alt',
				'fa-github-square' => 'github-square',
				'fa-github' => 'github',
				'fa-gitlab' => 'gitlab',
				'fa-glass' => 'glass',
				'fa-glide-g' => 'glide-g',
				'fa-glide' => 'glide',
				'fa-globe' => 'globe',
				'fa-google-plus-official' => 'google-plus-official',
				'fa-google-plus-square' => 'google-plus-square',
				'fa-google-plus' => 'google-plus',
				'fa-google-wallet' => 'google-wallet',
				'fa-google' => 'google',
				'fa-graduation-cap' => 'graduation-cap',
				'fa-gratipay' => 'gratipay',
				'fa-grav' => 'grav',
				'fa-h-square' => 'h-square',
				'fa-hacker-news' => 'hacker-news',
				'fa-hand-lizard-o' => 'hand-lizard-o',
				'fa-hand-o-down' => 'hand-o-down',
				'fa-hand-o-left' => 'hand-o-left',
				'fa-hand-o-right' => 'hand-o-right',
				'fa-hand-o-up' => 'hand-o-up',
				'fa-hand-paper-o' => 'hand-paper-o',
				'fa-hand-peace-o' => 'hand-peace-o',
				'fa-hand-pointer-o' => 'hand-pointer-o',
				'fa-hand-rock-o' => 'hand-rock-o',
				'fa-hand-scissors-o' => 'hand-scissors-o',
				'fa-hand-spock-o' => 'hand-spock-o',
				'fa-handshake-o' => 'handshake-o',
				'fa-hashtag' => 'hashtag',
				'fa-hdd-o' => 'hdd-o',
				'fa-header' => 'header',
				'fa-headphones' => 'headphones',
				'fa-heart-o' => 'heart-o',
				'fa-heart' => 'heart',
				'fa-heartbeat' => 'heartbeat',
				'fa-history' => 'history',
				'fa-home' => 'home',
				'fa-hospital-o' => 'hospital-o',
				'fa-hourglass-end' => 'hourglass-end',
				'fa-hourglass-half' => 'hourglass-half',
				'fa-hourglass-o' => 'hourglass-o',
				'fa-hourglass-start' => 'hourglass-start',
				'fa-hourglass' => 'hourglass',
				'fa-houzz' => 'houzz',
				'fa-html5' => 'html5',
				'fa-i-cursor' => 'i-cursor',
				'fa-id-badge' => 'id-badge',
				'fa-id-card-o' => 'id-card-o',
				'fa-id-card' => 'id-card',
				'fa-ils' => 'ils',
				'fa-imdb' => 'imdb',
				'fa-inbox' => 'inbox',
				'fa-indent' => 'indent',
				'fa-industry' => 'industry',
				'fa-info-circle' => 'info-circle',
				'fa-info' => 'info',
				'fa-inr' => 'inr',
				'fa-instagram' => 'instagram',
				'fa-internet-explorer' => 'internet-explorer',
				'fa-ioxhost' => 'ioxhost',
				'fa-italic' => 'italic',
				'fa-joomla' => 'joomla',
				'fa-jpy' => 'jpy',
				'fa-jsfiddle' => 'jsfiddle',
				'fa-key' => 'key',
				'fa-keyboard-o' => 'keyboard-o',
				'fa-krw' => 'krw',
				'fa-language' => 'language',
				'fa-laptop' => 'laptop',
				'fa-lastfm-square' => 'lastfm-square',
				'fa-lastfm' => 'lastfm',
				'fa-leaf' => 'leaf',
				'fa-leanpub' => 'leanpub',
				'fa-lemon-o' => 'lemon-o',
				'fa-level-down' => 'level-down',
				'fa-level-up' => 'level-up',
				'fa-life-ring' => 'life-ring',
				'fa-lightbulb-o' => 'lightbulb-o',
				'fa-line-chart' => 'line-chart',
				'fa-link' => 'link',
				'fa-linkedin-square' => 'linkedin-square',
				'fa-linkedin' => 'linkedin',
				'fa-linode' => 'linode',
				'fa-linux' => 'linux',
				'fa-list-alt' => 'list-alt',
				'fa-list-ol' => 'list-ol',
				'fa-list-ul' => 'list-ul',
				'fa-list' => 'list',
				'fa-location-arrow' => 'location-arrow',
				'fa-lock' => 'lock',
				'fa-long-arrow-down' => 'long-arrow-down',
				'fa-long-arrow-left' => 'long-arrow-left',
				'fa-long-arrow-right' => 'long-arrow-right',
				'fa-long-arrow-up' => 'long-arrow-up',
				'fa-low-vision' => 'low-vision',
				'fa-magic' => 'magic',
				'fa-magnet' => 'magnet',
				'fa-male' => 'male',
				'fa-map-marker' => 'map-marker',
				'fa-map-o' => 'map-o',
				'fa-map-pin' => 'map-pin',
				'fa-map-signs' => 'map-signs',
				'fa-map' => 'map',
				'fa-mars-double' => 'mars-double',
				'fa-mars-stroke-h' => 'mars-stroke-h',
				'fa-mars-stroke-v' => 'mars-stroke-v',
				'fa-mars-stroke' => 'mars-stroke',
				'fa-mars' => 'mars',
				'fa-maxcdn' => 'maxcdn',
				'fa-meanpath' => 'meanpath',
				'fa-medium' => 'medium',
				'fa-medkit' => 'medkit',
				'fa-meetup' => 'meetup',
				'fa-meh-o' => 'meh-o',
				'fa-mercury' => 'mercury',
				'fa-microchip' => 'microchip',
				'fa-microphone-slash' => 'microphone-slash',
				'fa-microphone' => 'microphone',
				'fa-minus-circle' => 'minus-circle',
				'fa-minus-square-o' => 'minus-square-o',
				'fa-minus-square' => 'minus-square',
				'fa-minus' => 'minus',
				'fa-mixcloud' => 'mixcloud',
				'fa-mobile' => 'mobile',
				'fa-modx' => 'modx',
				'fa-money' => 'money',
				'fa-moon-o' => 'moon-o',
				'fa-motorcycle' => 'motorcycle',
				'fa-mouse-pointer' => 'mouse-pointer',
				'fa-music' => 'music',
				'fa-neuter' => 'neuter',
				'fa-newspaper-o' => 'newspaper-o',
				'fa-object-group' => 'object-group',
				'fa-object-ungroup' => 'object-ungroup',
				'fa-odnoklassniki-square' => 'odnoklassniki-square',
				'fa-odnoklassniki' => 'odnoklassniki',
				'fa-opencart' => 'opencart',
				'fa-openid' => 'openid',
				'fa-opera' => 'opera',
				'fa-optin-monster' => 'optin-monster',
				'fa-outdent' => 'outdent',
				'fa-pagelines' => 'pagelines',
				'fa-paint-brush' => 'paint-brush',
				'fa-paper-plane-o' => 'paper-plane-o',
				'fa-paper-plane' => 'paper-plane',
				'fa-paperclip' => 'paperclip',
				'fa-paragraph' => 'paragraph',
				'fa-pause-circle-o' => 'pause-circle-o',
				'fa-pause-circle' => 'pause-circle',
				'fa-pause' => 'pause',
				'fa-paw' => 'paw',
				'fa-paypal' => 'paypal',
				'fa-pencil-square-o' => 'pencil-square-o',
				'fa-pencil-square' => 'pencil-square',
				'fa-pencil' => 'pencil',
				'fa-percent' => 'percent',
				'fa-phone-square' => 'phone-square',
				'fa-phone' => 'phone',
				'fa-picture-o' => 'picture-o',
				'fa-pie-chart' => 'pie-chart',
				'fa-pied-piper-alt' => 'pied-piper-alt',
				'fa-pied-piper-pp' => 'pied-piper-pp',
				'fa-pied-piper' => 'pied-piper',
				'fa-pinterest-p' => 'pinterest-p',
				'fa-pinterest-square' => 'pinterest-square',
				'fa-pinterest' => 'pinterest',
				'fa-plane' => 'plane',
				'fa-play-circle-o' => 'play-circle-o',
				'fa-play-circle' => 'play-circle',
				'fa-play' => 'play',
				'fa-plug' => 'plug',
				'fa-plus-circle' => 'plus-circle',
				'fa-plus-square-o' => 'plus-square-o',
				'fa-plus-square' => 'plus-square',
				'fa-plus' => 'plus',
				'fa-podcast' => 'podcast',
				'fa-power-off' => 'power-off',
				'fa-print' => 'print',
				'fa-product-hunt' => 'product-hunt',
				'fa-puzzle-piece' => 'puzzle-piece',
				'fa-qq' => 'qq',
				'fa-qrcode' => 'qrcode',
				'fa-question-circle-o' => 'question-circle-o',
				'fa-question-circle' => 'question-circle',
				'fa-question' => 'question',
				'fa-quora' => 'quora',
				'fa-quote-left' => 'quote-left',
				'fa-quote-right' => 'quote-right',
				'fa-random' => 'random',
				'fa-ravelry' => 'ravelry',
				'fa-rebel' => 'rebel',
				'fa-recycle' => 'recycle',
				'fa-reddit-alien' => 'reddit-alien',
				'fa-reddit-square' => 'reddit-square',
				'fa-reddit' => 'reddit',
				'fa-refresh' => 'refresh',
				'fa-registered' => 'registered',
				'fa-renren' => 'renren',
				'fa-repeat' => 'repeat',
				'fa-reply-all' => 'reply-all',
				'fa-reply' => 'reply',
				'fa-retweet' => 'retweet',
				'fa-road' => 'road',
				'fa-rocket' => 'rocket',
				'fa-rss-square' => 'rss-square',
				'fa-rss' => 'rss',
				'fa-rub' => 'rub',
				'fa-safari' => 'safari',
				'fa-scissors' => 'scissors',
				'fa-scribd' => 'scribd',
				'fa-search-minus' => 'search-minus',
				'fa-search-plus' => 'search-plus',
				'fa-search' => 'search',
				'fa-sellsy' => 'sellsy',
				'fa-server' => 'server',
				'fa-share-alt-square' => 'share-alt-square',
				'fa-share-alt' => 'share-alt',
				'fa-share-square-o' => 'share-square-o',
				'fa-share-square' => 'share-square',
				'fa-share' => 'share',
				'fa-shield' => 'shield',
				'fa-ship' => 'ship',
				'fa-shirtsinbulk' => 'shirtsinbulk',
				'fa-shopping-bag' => 'shopping-bag',
				'fa-shopping-basket' => 'shopping-basket',
				'fa-shopping-cart' => 'shopping-cart',
				'fa-shower' => 'shower',
				'fa-sign-in' => 'sign-in',
				'fa-sign-language' => 'sign-language',
				'fa-sign-out' => 'sign-out',
				'fa-signal' => 'signal',
				'fa-simplybuilt' => 'simplybuilt',
				'fa-sitemap' => 'sitemap',
				'fa-skyatlas' => 'skyatlas',
				'fa-skype' => 'skype',
				'fa-slack' => 'slack',
				'fa-sliders' => 'sliders',
				'fa-slideshare' => 'slideshare',
				'fa-smile-o' => 'smile-o',
				'fa-snapchat-ghost' => 'snapchat-ghost',
				'fa-snapchat-square' => 'snapchat-square',
				'fa-snapchat' => 'snapchat',
				'fa-snowflake-o' => 'snowflake-o',
				'fa-sort-alpha-asc' => 'sort-alpha-asc',
				'fa-sort-alpha-desc' => 'sort-alpha-desc',
				'fa-sort-amount-asc' => 'sort-amount-asc',
				'fa-sort-amount-desc' => 'sort-amount-desc',
				'fa-sort-asc' => 'sort-asc',
				'fa-sort-desc' => 'sort-desc',
				'fa-sort-numeric-asc' => 'sort-numeric-asc',
				'fa-sort-numeric-desc' => 'sort-numeric-desc',
				'fa-sort' => 'sort',
				'fa-soundcloud' => 'soundcloud',
				'fa-space-shuttle' => 'space-shuttle',
				'fa-spinner' => 'spinner',
				'fa-spoon' => 'spoon',
				'fa-spotify' => 'spotify',
				'fa-square-o' => 'square-o',
				'fa-square' => 'square',
				'fa-stack-exchange' => 'stack-exchange',
				'fa-stack-overflow' => 'stack-overflow',
				'fa-star-half-o' => 'star-half-o',
				'fa-star-half' => 'star-half',
				'fa-star-o' => 'star-o',
				'fa-star' => 'star',
				'fa-steam-square' => 'steam-square',
				'fa-steam' => 'steam',
				'fa-step-backward' => 'step-backward',
				'fa-step-forward' => 'step-forward',
				'fa-stethoscope' => 'stethoscope',
				'fa-sticky-note-o' => 'sticky-note-o',
				'fa-sticky-note' => 'sticky-note',
				'fa-stop-circle-o' => 'stop-circle-o',
				'fa-stop-circle' => 'stop-circle',
				'fa-stop' => 'stop',
				'fa-street-view' => 'street-view',
				'fa-strikethrough' => 'strikethrough',
				'fa-stumbleupon-circle' => 'stumbleupon-circle',
				'fa-stumbleupon' => 'stumbleupon',
				'fa-subscript' => 'subscript',
				'fa-subway' => 'subway',
				'fa-suitcase' => 'suitcase',
				'fa-sun-o' => 'sun-o',
				'fa-superpowers' => 'superpowers',
				'fa-superscript' => 'superscript',
				'fa-table' => 'table',
				'fa-tablet' => 'tablet',
				'fa-tachometer' => 'tachometer',
				'fa-tag' => 'tag',
				'fa-tags' => 'tags',
				'fa-tasks' => 'tasks',
				'fa-taxi' => 'taxi',
				'fa-telegram' => 'telegram',
				'fa-television' => 'television',
				'fa-tencent-weibo' => 'tencent-weibo',
				'fa-terminal' => 'terminal',
				'fa-text-height' => 'text-height',
				'fa-text-width' => 'text-width',
				'fa-th-large' => 'th-large',
				'fa-th-list' => 'th-list',
				'fa-th' => 'th',
				'fa-themeisle' => 'themeisle',
				'fa-thermometer-empty' => 'thermometer-empty',
				'fa-thermometer-full' => 'thermometer-full',
				'fa-thermometer-half' => 'thermometer-half',
				'fa-thermometer-quarter' => 'thermometer-quarter',
				'fa-thermometer-three-quarters' => 'thermometer-three-quarters',
				'fa-thumb-tack' => 'thumb-tack',
				'fa-thumbs-down' => 'thumbs-down',
				'fa-thumbs-o-down' => 'thumbs-o-down',
				'fa-thumbs-o-up' => 'thumbs-o-up',
				'fa-thumbs-up' => 'thumbs-up',
				'fa-ticket' => 'ticket',
				'fa-times-circle-o' => 'times-circle-o',
				'fa-times-circle' => 'times-circle',
				'fa-times' => 'times',
				'fa-tint' => 'tint',
				'fa-toggle-off' => 'toggle-off',
				'fa-toggle-on' => 'toggle-on',
				'fa-trademark' => 'trademark',
				'fa-train' => 'train',
				'fa-transgender-alt' => 'transgender-alt',
				'fa-transgender' => 'transgender',
				'fa-trash-o' => 'trash-o',
				'fa-trash' => 'trash',
				'fa-tree' => 'tree',
				'fa-trello' => 'trello',
				'fa-tripadvisor' => 'tripadvisor',
				'fa-trophy' => 'trophy',
				'fa-truck' => 'truck',
				'fa-try' => 'try',
				'fa-tty' => 'tty',
				'fa-tumblr-square' => 'tumblr-square',
				'fa-tumblr' => 'tumblr',
				'fa-twitch' => 'twitch',
				'fa-twitter-square' => 'twitter-square',
				'fa-twitter' => 'twitter',
				'fa-umbrella' => 'umbrella',
				'fa-underline' => 'underline',
				'fa-undo' => 'undo',
				'fa-universal-access' => 'universal-access',
				'fa-university' => 'university',
				'fa-unlock-alt' => 'unlock-alt',
				'fa-unlock' => 'unlock',
				'fa-upload' => 'upload',
				'fa-usb' => 'usb',
				'fa-usd' => 'usd',
				'fa-user-circle-o' => 'user-circle-o',
				'fa-user-circle' => 'user-circle',
				'fa-user-md' => 'user-md',
				'fa-user-o' => 'user-o',
				'fa-user-plus' => 'user-plus',
				'fa-user-secret' => 'user-secret',
				'fa-user-times' => 'user-times',
				'fa-user' => 'user',
				'fa-users' => 'users',
				'fa-venus-double' => 'venus-double',
				'fa-venus-mars' => 'venus-mars',
				'fa-venus' => 'venus',
				'fa-viacoin' => 'viacoin',
				'fa-viadeo-square' => 'viadeo-square',
				'fa-viadeo' => 'viadeo',
				'fa-video-camera' => 'video-camera',
				'fa-vimeo-square' => 'vimeo-square',
				'fa-vimeo' => 'vimeo',
				'fa-vine' => 'vine',
				'fa-vk' => 'vk',
				'fa-volume-control-phone' => 'volume-control-phone',
				'fa-volume-down' => 'volume-down',
				'fa-volume-off' => 'volume-off',
				'fa-volume-up' => 'volume-up',
				'fa-weibo' => 'weibo',
				'fa-weixin' => 'weixin',
				'fa-whatsapp' => 'whatsapp',
				'fa-wheelchair-alt' => 'wheelchair-alt',
				'fa-wheelchair' => 'wheelchair',
				'fa-wifi' => 'wifi',
				'fa-wikipedia-w' => 'wikipedia-w',
				'fa-window-close-o' => 'window-close-o',
				'fa-window-close' => 'window-close',
				'fa-window-maximize' => 'window-maximize',
				'fa-window-minimize' => 'window-minimize',
				'fa-window-restore' => 'window-restore',
				'fa-windows' => 'windows',
				'fa-wordpress' => 'wordpress',
				'fa-wpbeginner' => 'wpbeginner',
				'fa-wpexplorer' => 'wpexplorer',
				'fa-wpforms' => 'wpforms',
				'fa-wrench' => 'wrench',
				'fa-xing-square' => 'xing-square',
				'fa-xing' => 'xing',
				'fa-y-combinator' => 'y-combinator',
				'fa-yahoo' => 'yahoo',
				'fa-yelp' => 'yelp',
				'fa-yoast' => 'yoast',
				'fa-youtube-play' => 'youtube-play',
				'fa-youtube-square' => 'youtube-square',
				'fa-youtube' => 'youtube',
		);
		return $icon;
	}


	// Homepage Items
	$homeprefix = '_meanthemes_homepage_item_';

	if ( $simple_homepage_items ) {

		$mt_tools_simple_homepage_items = new_cmb2_box( array(
			'id'            => 'meanthemes_homepage_item_custom_meta',
			'title'      => __( 'Choose your layout', 'meanthemes' ),
			'object_types'  => array( 'meanthemes-homepage', ),
			'context'    => 'normal',
			'priority'   => 'high',
			'show_names' => false,
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name'    => __( 'Choose Your Layout', 'meanthemes' ),
			'desc'    => __( 'Choose from any of the layouts above', 'meanthemes' ),
			'id'      => $homeprefix . 'layout',
			'type'    => 'radio_inline',
			'options' => array(
				'content' => '<img src="'. MT_PLUGIN_URL . 'img/layout-content.png" /><span>'. __( 'Content' , 'meanthemes') . '</span>',
				'slider' => '<img src="'. MT_PLUGIN_URL . 'img/layout-slider.png" /><span>'. __( 'Slider' , 'meanthemes') . '</span>',
				'callout' => '<img src="'. MT_PLUGIN_URL . 'img/layout-callout.png" /><span>'. __( 'Callout' , 'meanthemes') . '</span>',
				'testimonials' => '<img src="'. MT_PLUGIN_URL . 'img/layout-testimonials.png" /><span>'. __( 'Testimonials' , 'meanthemes') . '</span>',
				'blog' => '<img src="'. MT_PLUGIN_URL . 'img/layout-blog.png" /><span>'. __( 'Blog' , 'meanthemes') . '</span>',
				'books' => '<img src="'. MT_PLUGIN_URL . 'img/layout-books.png" /><span>'. __( 'Books' , 'meanthemes') . '</span>',
			),
			'default'	=> 'content',
		) );

		// Content Options
		$mt_tools_simple_homepage_items = new_cmb2_box( array(
			'id'            => 'meanthemes_homepage_item_custom_meta_layout_content',
			'title'      => __( 'Content Setup', 'meanthemes' ),
			'object_types'  => array( 'meanthemes-homepage' ),
			'context'    => 'normal',
			'priority'   => 'high',
			'show_names' => true,
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name' => __( 'Enter your text/images here', 'meanthemes' ),
			'desc' => __( 'This is a free text area, you can put text or images in here, even shortcodes!', 'meanthemes' ),
			'id'   => $homeprefix . 'content',
			'type' => 'wysiwyg'
		) );

		// Slider Options
		$mt_tools_simple_homepage_items = new_cmb2_box( array(
			'id'            => 'meanthemes_homepage_item_custom_meta_layout_slider',
			'title'      => __( 'Slider Setup', 'meanthemes' ),
			'object_types'  => array( 'meanthemes-homepage' ),
			'context'    => 'normal',
			'priority'   => 'high',
			'show_names' => true,
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name'    => __( 'Make this is a slideshow', 'meanthemes' ),
			'id'      => $homeprefix .'slider_slideshow',
			'type'    => 'checkbox'
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name'    => __( 'Set Slideshow interval', 'meanthemes' ),
			'id'      => $homeprefix .'slider_slideshow_interval',
			'description' => __( 'Enter in milliseconds how much time you want the slide to show before it goes to the next one e.g. 1 second would be 1000 milliseconds.', 'meanthemes' ),
			'type'    => 'text_small',
			'default' => '7000'
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'id'          => $homeprefix . 'slider',
			'type'        => 'group',
			'description' => __( 'Add as many slides in here as you like', 'meanthemes' ),
			'options'     => array(
				'group_title'   => __( 'Slide {#}', 'meanthemes' ), // {#} gets replaced by row number
				'add_button'    => __( 'Add Another Slide', 'meanthemes' ),
				'remove_button' => __( 'Remove Slide', 'meanthemes' ),
				'sortable'      => true,
			),
			// Fields array works the same, except id's only need to be unique for this group. Prefix is not needed.
			'fields'      => array(
				array(
					'name' => 'Slide Image',
					'id'   => 'slide_image',
					'type' => 'file',
				),
				array(
					'name' => __( 'Slide Content', 'meanthemes' ),
					'id'   => 'slide_content',
					'type' => 'wysiwyg',
					'description' => __( 'If the content editor does not appear, just hit the blue "Publish" or "Update" to force it to reload.', 'meanthemes' ),
					'options' => array(
							'wpautop' => true, // use wpautop?
							'media_buttons' => false, // show insert/upload button(s)
							'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
					),
				),
				array(
					'name' => __( 'Link Slide to a Page', 'meanthemes' ),
					'id'   => 'slide_link',
					'type' => 'select',
					'options' => $page_select,
					'default' => 'default'
				),
				array(
					'name' => __( 'Or Link to a URL', 'meanthemes' ),
					'id'   => 'slide_link_http',
					'type' => 'text_url',
				),
				array(
					'name' => __( 'Open link in new window', 'meanthemes' ),
					'id'   => 'slide_link_new',
					'type' => 'checkbox',
				),

			),
		) );


		// Testimonials Options
		$mt_tools_simple_homepage_items = new_cmb2_box( array(
			'id'            => 'meanthemes_homepage_item_custom_meta_layout_testimonials',
			'title'      => __( 'Testimonials Setup', 'meanthemes' ),
			'object_types'  => array( 'meanthemes-homepage' ),
			'context'    => 'normal',
			'priority'   => 'high',
			'show_names' => true,
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name'    => __( 'Make this is a slideshow', 'meanthemes' ),
			'id'      => $homeprefix .'testimonials_slideshow',
			'type'    => 'checkbox'
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name'    => __( 'Set Slideshow interval', 'meanthemes' ),
			'id'      => $homeprefix .'testimonials_slideshow_interval',
			'description' => __( 'Enter in milliseconds how much time you want the slide to show before it goes to the next one e.g. 1 second would be 1000 milliseconds.', 'meanthemes' ),
			'type'    => 'text_small',
			'default' => '7000'
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'id'          => $homeprefix . 'testimonials',
			'type'        => 'group',
			'description' => __( 'Add as many different testimonials in here as you like.', 'meanthemes' ),
			'options'     => array(
				'group_title'   => __( 'Testimonial {#}', 'meanthemes' ), // {#} gets replaced by row number
				'add_button'    => __( 'Add Another Testimonial', 'meanthemes' ),
				'remove_button' => __( 'Remove Testimonial', 'meanthemes' ),
				'sortable'      => true,
			),
			// Fields array works the same, except id's only need to be unique for this group. Prefix is not needed.
			'fields'      => array(
				array(
					'name' => __('Testimonial','meanthemes'),
					'id'   => 'quote',
					'type' => 'textarea',
				),
				array(
					'name' => __('Testimonial Source','meanthemes'),
					'id'   => 'source',
					'type' => 'text',
				),
			),
		) );

		// Blog Options
		$mt_tools_simple_homepage_items = new_cmb2_box( array(
			'id'            => 'meanthemes_homepage_item_custom_meta_layout_blog',
			'title'      => __( 'Blog Setup', 'meanthemes' ),
			'object_types'  => array( 'meanthemes-homepage' ),
			'context'    => 'normal',
			'priority'   => 'high',
			'show_names' => true,
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name' => __( 'Title', 'meanthemes' ),
			'desc' => __( 'This will show above the blog articles', 'meanthemes' ),
			'id'   => $homeprefix . 'blog_title',
			'type' => 'text'
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name'    => __( 'Show This many Blog Articles', 'meanthemes' ),
			'id'      => $homeprefix . 'blog_select',
			'type'    => 'select',
			'default'	=> '8',
			'options' => array(
				'2'     => __( '2', 'meanthemes' ),
				'4'     => __( '4', 'meanthemes' ),
				'6'     => __( '6', 'meanthemes' ),
				'8'     => __( '8', 'meanthemes' ),
				'10'     => __( '10', 'meanthemes' ),
				'12'     => __( '12', 'meanthemes' ),
				'14'     => __( '14', 'meanthemes' ),
				'16'     => __( '16', 'meanthemes' ),
				'18'     => __( '18', 'meanthemes' ),
				'20'     => __( '20', 'meanthemes' ),
			),
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name' => __( 'Link to Static Blog Page', 'meanthemes' ),
			'desc' => __( 'You need to first create a new page and then set that as your static blog page via Settings > Reading then select that page here.', 'meanthemes' ),
			'id'   => $homeprefix . 'blog_articles',
			'type' => 'select',
			'options' => $page_select,
			'default' => 'default'
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name' => __( 'Button text for "View more"', 'meanthemes' ),
			'id'   => $homeprefix . 'blog_articles_text',
			'type' => 'text',
			'default' => __('View More', 'meanthemes'),
		) );

		// Books Options
		$mt_tools_simple_homepage_items = new_cmb2_box( array(
			'id'            => 'meanthemes_homepage_item_custom_meta_layout_books',
			'title'      => __( 'Books Setup', 'meanthemes' ),
			'object_types'  => array( 'meanthemes-homepage' ),
			'context'    => 'normal',
			'priority'   => 'high',
			'show_names' => true,
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name' => __( 'Title', 'meanthemes' ),
			'desc' => __( 'This will show above the books', 'meanthemes' ),
			'id'   => $homeprefix . 'books_title',
			'type' => 'text'
		) );

		$mt_tools_simple_homepage_items->add_field( array(
			'name'    => __( 'Show This many Books', 'meanthemes' ),
			'id'      => $homeprefix . 'books_select',
			'type'    => 'select',
			'default'	=> '8',
			'options' => array(
				'2'     => __( '2', 'meanthemes' ),
				'4'     => __( '4', 'meanthemes' ),
				'6'     => __( '6', 'meanthemes' ),
				'8'     => __( '8', 'meanthemes' ),
				'10'     => __( '10', 'meanthemes' ),
				'12'     => __( '12', 'meanthemes' ),
				'14'     => __( '14', 'meanthemes' ),
				'16'     => __( '16', 'meanthemes' ),
				'18'     => __( '18', 'meanthemes' ),
				'20'     => __( '20', 'meanthemes' ),
			),
		) );



	} else {

		// ADVANCED HOMEPAGE ITEMS


		$mt_tools_advanced_homepage_items = new_cmb2_box( array(
			'id'         => 'meanthemes_homepage_item_custom_meta',
			'title'      => __( 'Choose your layout', 'meanthemes' ),
			'object_types'  => array( 'meanthemes-homepage', ),
			'context'    => 'normal',
			'priority'   => 'high',
			'show_names' => false,
		) );

		$mt_tools_advanced_homepage_items->add_field( array(
			'name'    => __( 'Choose Your Layout', 'meanthemes' ),
			'desc'    => __( 'Choose from any of the layouts above', 'meanthemes' ),
			'id'      => $homeprefix . 'layout',
			'type'    => 'radio_inline',
			'options' => array(
				'content' => '<img src="'. MT_PLUGIN_URL . 'img/layout-content.png" /><span>'. __( 'Content' , 'meanthemes') . '</span>',
				'slider' => '<img src="'. MT_PLUGIN_URL . 'img/layout-slider.png" /><span>'. __( 'Slider' , 'meanthemes') . '</span>',
				'portfolio' => '<img src="'. MT_PLUGIN_URL . 'img/layout-portfolio.png" /><span>'. __( 'Portfolio' , 'meanthemes') . '</span>',
				'process' => '<img src="'. MT_PLUGIN_URL . 'img/layout-process.png" /><span>'. __( 'Process' , 'meanthemes') . '</span>',
				'stats' => '<img src="'. MT_PLUGIN_URL . 'img/layout-stats.png" /><span>'. __( 'Stats' , 'meanthemes') . '</span>',
				'callout' => '<img src="'. MT_PLUGIN_URL . 'img/layout-callout.png" /><span>'. __( 'Callout' , 'meanthemes') . '</span>',
				'testimonials' => '<img src="'. MT_PLUGIN_URL . 'img/layout-testimonials.png" /><span>'. __( 'Testimonials' , 'meanthemes') . '</span>',
				'blog' => '<img src="'. MT_PLUGIN_URL . 'img/layout-blog.png" /><span>'. __( 'Blog' , 'meanthemes') . '</span>',
			),
			'default'	=> 'content',
		) );

			// Content Options
			$mt_tools_advanced_homepage_items = new_cmb2_box( array(
				'id'            => 'meanthemes_homepage_item_custom_meta_layout_content',
				'title'      => __( 'Content Setup', 'meanthemes' ),
				'object_types'  => array( 'meanthemes-homepage' ),
				'context'    => 'normal',
				'priority'   => 'high',
				'show_names' => true,
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name' => __( 'Choose an Icon', 'meanthemes' ),
				'id'   => $homeprefix . 'content_icon',
				'type'    => 'select',
				'description' => __( 'We use <a href="http://fortawesome.github.io/Font-Awesome/" target="_blank">FontAwesome Icons</a> for the testimonials, please visit that link, find the icon you want and find the icon name in this link.', 'meanthemes' ),
				'options' => $icons = meanthemes_tools_fa_icons_list(),
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name' => __( 'Enter your text/images here', 'meanthemes' ),
				'desc' => __( 'This is a free text area, you can put text or images in here, even shortcodes!', 'meanthemes' ),
				'id'   => $homeprefix . 'content',
				'type' => 'wysiwyg'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Background Color', 'meanthemes' ),
				'id'      => $homeprefix .'content_color_bg',
				'type'    => 'colorpicker',
				'default' => '#161b20'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Heading Color', 'meanthemes' ),
				'id'      => $homeprefix .'content_heading_color',
				'type'    => 'colorpicker',
				'default' => '#f3e042'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Heading 2 Color', 'meanthemes' ),
				'id'      => $homeprefix .'content_heading_2_color',
				'type'    => 'colorpicker',
				'default' => '#4d5b67'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Content Color', 'meanthemes' ),
				'id'      => $homeprefix .'content_color',
				'type'    => 'colorpicker',
				'default' => '#4d5b67'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Icon Color', 'meanthemes' ),
				'id'      => $homeprefix . 'content_icon_color',
				'type'    => 'colorpicker',
				'default' => '#f3e042'
			) );

			//Slider Options
			$mt_tools_advanced_homepage_items = new_cmb2_box( array(
				'id'            => 'meanthemes_homepage_item_custom_meta_layout_slider',
				'title'      => __( 'Slider Setup', 'meanthemes' ),
				'object_types'  => array( 'meanthemes-homepage' ),
				'context'    => 'normal',
				'priority'   => 'high',
				'show_names' => true,
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Make this is a slideshow', 'meanthemes' ),
				'id'      => $homeprefix .'slider_slideshow',
				'type'    => 'checkbox'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Set Slideshow interval', 'meanthemes' ),
				'id'      => $homeprefix .'slider_slideshow_interval',
				'description' => __( 'Enter in milliseconds how much time you want the slide to show before it goes to the next one e.g. 1 second would be 1000 milliseconds.', 'meanthemes' ),
				'type'    => 'text_small',
				'default' => '7000'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Background Color', 'meanthemes' ),
				'id'      => $homeprefix . 'slider_color_bg',
				'type'    => 'colorpicker',
				'default' => '#f3e042'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Background Color', 'meanthemes' ),
				'id'      => $homeprefix . 'slider_color_bg',
				'type'    => 'colorpicker',
				'default' => '#f3e042'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Headline Color', 'meanthemes' ),
				'id'      => $homeprefix . 'slider_color_headline',
				'type'    => 'colorpicker',
				'default' => '#161b20'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Sub Headline Color', 'meanthemes' ),
				'id'      => $homeprefix . 'slider_color_sub_headline',
				'type'    => 'colorpicker',
				'default' => '#161b20'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Navigational Arrow Color', 'meanthemes' ),
				'id'      => $homeprefix . 'slider_color_arrows',
				'type'    => 'colorpicker',
				'default' => '#161b20'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'id'          => $homeprefix . 'slider',
				'type'        => 'group',
				'description' => __( 'Add as many slides in here as you like', 'meanthemes' ),
				'options'     => array(
					'group_title'   => __( 'Slide {#}', 'meanthemes' ), // {#} gets replaced by row number
					'add_button'    => __( 'Add Another Slide', 'meanthemes' ),
					'remove_button' => __( 'Remove Slide', 'meanthemes' ),
					'sortable'      => true,
				),
				// Fields array works the same, except id's only need to be unique for this group. Prefix is not needed.
				'fields'      => array(
					array(
						'name' => 'Slide Image',
						'id'   => 'slide_image',
						'type' => 'file',
					),
					array(
						'name' => __( 'Slide Headline', 'meanthemes' ),
						'id'   => 'slide_headline',
						'type' => 'text',
					),
					array(
						'name' => __( 'Slide Sub Headline', 'meanthemes' ),
						'id'   => 'slide_sub_headline',
						'type' => 'text',
					),
				),
			) );

			// Portfolio Options
			$mt_tools_advanced_homepage_items = new_cmb2_box( array(
				'id'            => 'meanthemes_homepage_item_custom_meta_layout_portfolio',
				'title'      => __( 'Portfolio Setup', 'meanthemes' ),
				'object_types'  => array( 'meanthemes-homepage' ),
				'context'    => 'normal',
				'priority'   => 'high',
				'show_names' => true,
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name' => __( 'Choose an Icon', 'meanthemes' ),
				'id'   => $homeprefix . 'portfolio_icon',
				'type'    => 'select',
				'description' => __( 'We use <a href="http://fortawesome.github.io/Font-Awesome/" target="_blank">FontAwesome Icons</a> for the testimonials, please visit that link, find the icon you want and find the icon name in this link.', 'meanthemes' ),
				'options' => $icons = meanthemes_tools_fa_icons_list(),
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name' => __( 'Title', 'meanthemes' ),
				'desc' => __( 'This will show above the portfolio items', 'meanthemes' ),
				'id'   => $homeprefix . 'portfolio_title',
				'type' => 'text'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Show This many Projects', 'meanthemes' ),
				'id'      => $homeprefix . 'portfolio_select',
				'type'    => 'select',
				'default'	=> '6',
				'options' => array(
					'3'     => __( '3', 'meanthemes' ),
					'6'     => __( '6', 'meanthemes' ),
					'9'     => __( '9', 'meanthemes' ),
					'12'     => __( '12', 'meanthemes' ),
					'15'     => __( '15', 'meanthemes' ),
					'18'     => __( '18', 'meanthemes' ),
					'21'     => __( '21', 'meanthemes' ),
					'24'     => __( '24', 'meanthemes' ),
				),
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Background Color', 'meanthemes' ),
				'id'      => $homeprefix .'portfolio_color_bg',
				'type'    => 'colorpicker',
				'default' => '#161b20'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Title &amp; Content Color', 'meanthemes' ),
				'id'      => $homeprefix .'portfolio_title_color',
				'type'    => 'colorpicker',
				'default' => '#fff'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Icon Color', 'meanthemes' ),
				'id'      => $homeprefix .'portfolio_icon_color',
				'type'    => 'colorpicker',
				'default' => '#f3e042'
			) );

			// Process Options
			$mt_tools_advanced_homepage_items = new_cmb2_box( array(
				'id'            => 'meanthemes_homepage_item_custom_meta_layout_process',
				'title'      => __( 'Process Setup', 'meanthemes' ),
				'object_types'  => array( 'meanthemes-homepage' ),
				'context'    => 'normal',
				'priority'   => 'high',
				'show_names' => true,
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name' => __( 'Title', 'meanthemes' ),
				'desc' => __( 'This will show above the process bar', 'meanthemes' ),
				'id'   => $homeprefix . 'process_title',
				'type' => 'text'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Background Color', 'meanthemes' ),
				'id'      => $homeprefix .'process_color_bg',
				'type'    => 'colorpicker',
				'default' => '#f7f7f7'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Title Color', 'meanthemes' ),
				'id'      => $homeprefix .'process_title_color',
				'type'    => 'colorpicker',
				'default' => '#161b1f'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Label Color', 'meanthemes' ),
				'id'      => $homeprefix .'process_label_color',
				'type'    => 'colorpicker',
				'default' => '#161b1f'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Marker Color', 'meanthemes' ),
				'id'      => $homeprefix .'process_marker_color',
				'type'    => 'colorpicker',
				'default' => '#f3e042'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'name'    => __( 'Marker Bar Color', 'meanthemes' ),
				'id'      => $homeprefix .'process_bar_color',
				'type'    => 'colorpicker',
				'default' => '#bac3cc'
			) );

			$mt_tools_advanced_homepage_items->add_field( array(
				'id'          => $homeprefix . 'process',
				'type'        => 'group',
				'description' => __( 'Add up to 5 otherwise it gets messy!', 'meanthemes' ),
				'options'     => array(
					'group_title'   => __( 'Process {#}', 'meanthemes' ), // {#} gets replaced by row number
					'add_button'    => __( 'Add Another Process', 'meanthemes' ),
					'remove_button' => __( 'Remove Process', 'meanthemes' ),
					'sortable'      => true,
				),
				// Fields array works the same, except id's only need to be unique for this group. Prefix is not needed.
				'fields'      => array(
					array(
						'name' => 'Process Label',
						'id'   => 'process_label',
						'type' => 'text',
					),

					array(
						'name'    => __( 'Show this at', 'meanthemes' ),
						'id'      => 'process_select',
						'type'    => 'select',
						'default'	=> '1',
						'options' => array(
							'1'     => __( '0%', 'meanthemes' ),
							'5'     => __( '5%', 'meanthemes' ),
							'10'     => __( '10%', 'meanthemes' ),
							'15'     => __( '15%', 'meanthemes' ),
							'20'     => __( '20%', 'meanthemes' ),
							'25'     => __( '25%', 'meanthemes' ),
							'30'     => __( '30%', 'meanthemes' ),
							'35'     => __( '35%', 'meanthemes' ),
							'40'     => __( '40%', 'meanthemes' ),
							'45'     => __( '45%', 'meanthemes' ),
							'50'     => __( '50%', 'meanthemes' ),
							'55'     => __( '55%', 'meanthemes' ),
							'60'     => __( '60%', 'meanthemes' ),
							'65'     => __( '65%', 'meanthemes' ),
							'70'     => __( '70%', 'meanthemes' ),
							'75'     => __( '75%', 'meanthemes' ),
							'80'     => __( '80%', 'meanthemes' ),
							'85'     => __( '85%', 'meanthemes' ),
							'90'     => __( '90%', 'meanthemes' ),
							'95'     => __( '95%', 'meanthemes' ),
							'100'     => __( '100%', 'meanthemes' ),
						),
					),
				),
			) );

	// Stats Options
	$mt_tools_advanced_homepage_items = new_cmb2_box( array(
		'id'            => 'meanthemes_homepage_item_custom_meta_layout_stats',
		'title'      => __( 'Stats Setup', 'meanthemes' ),
		'object_types'  => array( 'meanthemes-homepage' ),
		'context'    => 'normal',
		'priority'   => 'high',
		'show_names' => true,
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Background Color', 'meanthemes' ),
		'id'      => $homeprefix .'stats_color_bg',
		'type'    => 'colorpicker',
		'default' => '#161b20'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Icon Color', 'meanthemes' ),
		'id'      => $homeprefix .'stats_color_icon',
		'type'    => 'colorpicker',
		'default' => '#2d3136'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Stat Number Color', 'meanthemes' ),
		'id'      => $homeprefix .'stats_color_line_1',
		'type'    => 'colorpicker',
		'default' => '#f7f7f7'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Stat Line 2 Color', 'meanthemes' ),
		'id'      => $homeprefix .'stats_color_line_2',
		'type'    => 'colorpicker',
		'default' => '#77797a'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Stat Line 3 Color', 'meanthemes' ),
		'id'      => $homeprefix .'stats_color_line_3',
		'type'    => 'colorpicker',
		'default' => '#2d3136'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Disabled animate number count', 'meanthemes' ),
		'id'      => $homeprefix .'stats_animate',
		'type'    => 'checkbox'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'id'          => $homeprefix . 'stats',
		'type'        => 'group',
		'description' => __( 'Add as many different stats in here as you like. We use <a href="http://fortawesome.github.io/Font-Awesome/" target="_blank">FontAwesome Icons</a> for the stats, please visit that link, find the icon you want and find the icon name in this link.', 'meanthemes' ),
		'options'     => array(
			'group_title'   => __( 'Stat {#}', 'meanthemes' ), // {#} gets replaced by row number
			'add_button'    => __( 'Add Another Stat', 'meanthemes' ),
			'remove_button' => __( 'Remove Stat', 'meanthemes' ),
			'sortable'      => true,
		),
		// Fields array works the same, except id's only need to be unique for this group. Prefix is not needed.
		'fields'      => array(

			array(
				'name' => __( 'Choose an Icon', 'meanthemes' ),
				'id'   => 'stat_icon',
				'type'    => 'select',
				'options' => $icons = meanthemes_tools_fa_icons_list(),
			),
			array(
				'name' => __( 'Stat Number', 'meanthemes' ),
				'id'   => 'stat_number',
				'type' => 'text_small',
			),
			array(
				'name' => __( 'Stat Line 2', 'meanthemes' ),
				'id'   => 'stat_line_2',
				'type' => 'text',
			),
			array(
				'name' => __( 'Stat Line 3', 'meanthemes' ),
				'id'   => 'stat_line_3',
				'type' => 'text',
			),
		),
	) );

	// Testimonials Options
	$mt_tools_advanced_homepage_items = new_cmb2_box( array(
		'id'            => 'meanthemes_homepage_item_custom_meta_layout_testimonials',
		'title'      => __( 'Testimonials Setup', 'meanthemes' ),
		'object_types'  => array( 'meanthemes-homepage' ),
		'context'    => 'normal',
		'priority'   => 'high',
		'show_names' => true,
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name' => __( 'Choose an Icon', 'meanthemes' ),
		'id'   => $homeprefix .'testimonials_icon',
		'type'    => 'select',
		'options' => $icons = meanthemes_tools_fa_icons_list(),
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Background Color', 'meanthemes' ),
		'id'      => $homeprefix .'testimonials_color_bg',
		'type'    => 'colorpicker',
		'default' => '#2a333b'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Icon Color', 'meanthemes' ),
		'id'      => $homeprefix .'testimonials_color_icon',
		'type'    => 'colorpicker',
		'default' => '#464c52'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Testimonial Color', 'meanthemes' ),
		'id'      => $homeprefix .'testimonials_color',
		'type'    => 'colorpicker',
		'default' => '#d7d8d8'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Make this is a slideshow', 'meanthemes' ),
		'id'      => $homeprefix .'testimonials_slideshow',
		'type'    => 'checkbox'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Make this is a slideshow', 'meanthemes' ),
		'id'      => $homeprefix .'testimonials_slideshow',
		'type'    => 'checkbox'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Set Slideshow interval', 'meanthemes' ),
		'id'      => $homeprefix .'testimonials_slideshow_interval',
		'description' => __( 'Enter in milliseconds how much time you want the slide to show before it goes to the next one e.g. 1 second would be 1000 milliseconds.', 'meanthemes' ),
		'type'    => 'text_small',
		'default' => '7000'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'id'          => $homeprefix . 'testimonials',
		'type'        => 'group',
		'description' => __( 'Add as many different testimonials in here as you like. We use <a href="http://fortawesome.github.io/Font-Awesome/" target="_blank">FontAwesome Icons</a> for the testimonials, please visit that link, find the icon you want and find the icon name in this link.', 'meanthemes' ),
		'options'     => array(
			'group_title'   => __( 'Testimonial {#}', 'meanthemes' ), // {#} gets replaced by row number
			'add_button'    => __( 'Add Another Testimonial', 'meanthemes' ),
			'remove_button' => __( 'Remove Testimonial', 'meanthemes' ),
			'sortable'      => true,
		),
				// Fields array works the same, except id's only need to be unique for this group. Prefix is not needed.
				'fields'      => array(
					array(
						'name' => __('Testimonial','meanthemes'),
						'id'   => 'quote',
						'type' => 'textarea',
					),
					array(
						'name' => __('Testimonial Source','meanthemes'),
						'id'   => 'source',
						'type' => 'text',
					),
				),

	) );

	// Blog Options
	$mt_tools_advanced_homepage_items = new_cmb2_box( array(
		'id'            => 'meanthemes_homepage_item_custom_meta_layout_blog',
		'title'      => __( 'Blog Setup', 'meanthemes' ),
		'object_types'  => array( 'meanthemes-homepage' ),
		'context'    => 'normal',
		'priority'   => 'high',
		'show_names' => true,
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name' => __( 'Choose an Icon', 'meanthemes' ),
		'id'   => $homeprefix . 'blog_icon',
		'type'    => 'select',
		'description' => __( 'We use <a href="http://fortawesome.github.io/Font-Awesome/" target="_blank">FontAwesome Icons</a> for the testimonials, please visit that link, find the icon you want and find the icon name in this link.', 'meanthemes' ),
		'options' => $icons = meanthemes_tools_fa_icons_list(),
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name' => __( 'Title', 'meanthemes' ),
		'desc' => __( 'This will show above the blog articles', 'meanthemes' ),
		'id'   => $homeprefix . 'blog_title',
		'type' => 'text'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Show This many Blog Articles', 'meanthemes' ),
		'id'      => $homeprefix . 'blog_select',
		'type'    => 'select',
		'default'	=> '6',
		'options' => array(
			'3'     => __( '3', 'meanthemes' ),
			'6'     => __( '6', 'meanthemes' ),
			'9'     => __( '9', 'meanthemes' ),
			'12'     => __( '12', 'meanthemes' ),
			'15'     => __( '15', 'meanthemes' ),
			'18'     => __( '18', 'meanthemes' ),
			'21'     => __( '21', 'meanthemes' ),
			'24'     => __( '24', 'meanthemes' ),
		),
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name' => __( 'Link to Static Blog Page', 'meanthemes' ),
		'desc' => __( 'You need to first create a new page and then set that as your static blog page via Settings > Reading then select that page here.', 'meanthemes' ),
		'id'   => $homeprefix . 'blog_articles',
		'type' => 'select',
		'options' => $page_select,
		'default' => 'default'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name' => __( 'Button text for "View more"', 'meanthemes' ),
		'id'   => $homeprefix . 'blog_articles_text',
		'type' => 'text',
		'default' => __('View More', 'meanthemes'),
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Background Color', 'meanthemes' ),
		'id'      => $homeprefix .'blog_color_bg',
		'type'    => 'colorpicker',
		'default' => '#161b20'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Title Color', 'meanthemes' ),
		'id'      => $homeprefix .'blog_title_color',
		'type'    => 'colorpicker',
		'default' => '#fff'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Icon Color', 'meanthemes' ),
		'id'      => $homeprefix .'blog_icon_color',
		'type'    => 'colorpicker',
		'default' => '#f3e042'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'View More Button Link Color', 'meanthemes' ),
		'id'      => $homeprefix .'blog_button_link_color',
		'type'    => 'colorpicker',
		'default' => '#ffffff'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'View More Button Link Color', 'meanthemes' ),
		'id'      => $homeprefix .'blog_button_link_color',
		'type'    => 'colorpicker',
		'default' => '#ffffff'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'View More Button Border Color', 'meanthemes' ),
		'id'      => $homeprefix .'blog_button_link_border_color',
		'type'    => 'colorpicker',
		'default' => '#ffffff'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'View More Button Link Color', 'meanthemes' ),
		'id'      => $homeprefix .'blog_button_link_color_hover',
		'type'    => 'colorpicker',
		'default' => '#888888'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'View More Button Border Hover Color', 'meanthemes' ),
		'id'      => $homeprefix .'blog_button_link_border_color_hover',
		'type'    => 'colorpicker',
		'default' => '#888888'
	) );

	} // End ELSE for simple homepage items


// SHARED HOMEPAGE ITEMS

// Callout Options
$mt_tools_advanced_homepage_items = new_cmb2_box( array(
	'id'            => 'meanthemes_homepage_item_custom_meta_layout_callout',
	'title'      => __( 'Callout Setup', 'meanthemes' ),
	'object_types'  => array( 'meanthemes-homepage' ),
	'context'    => 'normal',
	'priority'   => 'high',
	'show_names' => true,
) );

$mt_tools_advanced_homepage_items->add_field( array(
	'name' => __( 'Enter your text/images here', 'meanthemes' ),
	'desc' => __( 'This is a free text area, you can put text or images in here, even shortcodes!', 'meanthemes' ),
	'id'   => $homeprefix . 'callout',
	'type' => 'wysiwyg',
) );

$mt_tools_advanced_homepage_items->add_field( array(
	'name'    => __( 'Button Text', 'meanthemes' ),
	'id'      => $homeprefix .'callout_link_text',
	'type'    => 'text'
) );

$mt_tools_advanced_homepage_items->add_field( array(
	'name'    => __( 'Button Link', 'meanthemes' ),
	'id'      => $homeprefix .'callout_link',
	'description' => __( 'Enter the whole URL including http://(s)', 'meanthemes' ),
	'type'    => 'text_url'
) );

$mt_tools_advanced_homepage_items->add_field( array(
	'name'    => __( 'Background Color', 'meanthemes' ),
	'id'      => $homeprefix .'callout_color_bg',
	'type'    => 'colorpicker',
	'default' => '#f3e042'
) );

$mt_tools_advanced_homepage_items->add_field( array(
	'name'    => __( 'Content Color', 'meanthemes' ),
	'id'      => $homeprefix .'callout_content_color',
	'type'    => 'colorpicker',
	'default' => '#161b20'
) );

$mt_tools_advanced_homepage_items->add_field( array(
	'name'    => __( 'Button Link Color', 'meanthemes' ),
	'id'      => $homeprefix . 'callout_link_color',
	'type'    => 'colorpicker',
	'default' => '#161b20'
) );

$mt_tools_advanced_homepage_items->add_field( array(
	'name'    => __( 'Button Border Color', 'meanthemes' ),
	'id'      => $homeprefix .'callout_border_color',
	'type'    => 'colorpicker',
	'default' => '#161b20'
) );

$mt_tools_advanced_homepage_items->add_field( array(
	'name'    => __( 'Button Link Hover Color', 'meanthemes' ),
	'id'      => $homeprefix .'callout_link_hover_color',
	'type'    => 'colorpicker',
	'default' => '#fff'
) );

$mt_tools_advanced_homepage_items->add_field( array(
	'name'    => __( 'Button Border Hover Color', 'meanthemes' ),
	'id'      => $homeprefix .'callout_border_hover_color',
	'type'    => 'colorpicker',
	'default' => '#fff'
) );


// Animation options

if ( $simple_homepage_items ) {


} else {


	// Global Options

	$mt_tools_advanced_homepage_items = new_cmb2_box( array(
		'id'            => 'meanthemes_homepage_item_custom_meta_layout_global',
		'title'      => __( 'Animation &amp; Reveal Setup', 'meanthemes' ),
		'object_types'  => array( 'meanthemes-homepage' ),
		'context'    => 'normal',
		'priority'   => 'high',
		'show_names' => true,
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name' => __( 'Set a Unique ID for this item?', 'meanthemes' ),
		'desc' => __( 'This allows you to set an SEO friendly id so you can jump to it from your navigation e.g. portfolio', 'meanthemes' ),
		'id'   => $homeprefix . 'global_unique_id',
		'type' => 'text_small',
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name' => __( 'Disable Animation based on viewport?', 'meanthemes' ),
		'desc' => __( 'This means the homepage item will no longer animate in when scrolled into view based on the settings below', 'meanthemes' ),
		'id'   => $homeprefix . 'global_animate',
		'type' => 'checkbox'
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Animate delay', 'meanthemes' ),
		'id'      => $homeprefix . 'global_wow_delay',
		'type'    => 'select',
		'default'	=> '.25',
		'options' => array(
			'.25s'     => __( '0.25 seconds', 'meanthemes' ),
			'.5s'     => __( '0.5 seconds', 'meanthemes' ),
			'.75s'     => __( '0.75 seconds', 'meanthemes' ),
			'1s'     => __( '1 second', 'meanthemes' ),
			'1.25s'     => __( '1.25 seconds', 'meanthemes' ),
			'1.5s'     => __( '1.5 seconds', 'meanthemes' ),
			'1.75s'     => __( '1.75 seconds', 'meanthemes' ),
			'2s'     => __( '2 seconds', 'meanthemes' ),
		),
	) );

	$mt_tools_advanced_homepage_items->add_field( array(
		'name'    => __( 'Animation Style', 'meanthemes' ),
		'id'      => $homeprefix . 'global_animate_style',
		'description' => __('We use <a href="http://daneden.github.io/animate.css/" target="_blank">Animate.css</a> which work in CSS3 enabled browsers.'),
		'type'    => 'select',
		'default'	=> 'fadeInUp',
		'options' => array(
				'bounce'     => __( 'bounce', 'meanthemes' ),
				'flash'     => __( 'flash', 'meanthemes' ),
				'pulse'     => __( 'pulse', 'meanthemes' ),
				'rubberBand'     => __( 'rubberBand', 'meanthemes' ),
				'shake'     => __( 'shake', 'meanthemes' ),
				'swing'     => __( 'swing', 'meanthemes' ),
				'tada'     => __( 'tada', 'meanthemes' ),
				'wobble'     => __( 'wobble', 'meanthemes' ),
				'bounceIn'     => __( 'bounceIn', 'meanthemes' ),
				'bounceInDown'     => __( 'bounceInDown', 'meanthemes' ),
				'bounceInLeft'     => __( 'bounceInLeft', 'meanthemes' ),
				'bounceInRight'     => __( 'bounceInRight', 'meanthemes' ),
				'bounceInUp'     => __( 'bounceInUp', 'meanthemes' ),
				'fadeIn'     => __( 'fadeIn', 'meanthemes' ),
				'fadeInDown'     => __( 'fadeInDown', 'meanthemes' ),
				'fadeInDownBig'     => __( 'fadeInDownBig', 'meanthemes' ),
				'fadeInLeft'     => __( 'fadeInLeft', 'meanthemes' ),
				'fadeInLeftBig'     => __( 'fadeInLeftBig', 'meanthemes' ),
				'fadeInRight'     => __( 'fadeInRight', 'meanthemes' ),
				'fadeInRightBig'     => __( 'fadeInRightBig', 'meanthemes' ),
				'fadeInUp'     => __( 'fadeInUp', 'meanthemes' ),
				'fadeInUpBig'     => __( 'fadeInUpBig', 'meanthemes' ),
				'flip'     => __( 'flip', 'meanthemes' ),
				'flipInX'     => __( 'flipInX', 'meanthemes' ),
				'flipInY'     => __( 'flipInY', 'meanthemes' ),
				'lightSpeedIn'     => __( 'lightSpeedIn', 'meanthemes' ),
				'rotateIn'     => __( 'rotateIn', 'meanthemes' ),
				'rotateInDownLeft'     => __( 'rotateInDownLeft', 'meanthemes' ),
				'rotateInDownRight'     => __( 'rotateInDownRight', 'meanthemes' ),
				'rotateInUpLeft'     => __( 'rotateInUpLeft', 'meanthemes' ),
				'rotateInUpRight'     => __( 'rotateInUpRight', 'meanthemes' ),
				'rollIn'     => __( 'rollIn', 'meanthemes' ),
				'zoomIn'     => __( 'zoomIn', 'meanthemes' ),
				'zoomInDown'     => __( 'zoomInDown', 'meanthemes' ),
				'zoomInLeft'     => __( 'zoomInLeft', 'meanthemes' ),
				'zoomInRight'     => __( 'zoomInRight', 'meanthemes' ),
				'zoomInUp'     => __( 'zoomInUp', 'meanthemes' ),
		),
	) );


} // END ELSE for simple homepage item


if ( ( current_theme_supports( 'meanthemes_portfolio_advanced_support' ) ) ) {

		$portfolioprefix = "_meanthemes_portfolio_advanced_";

		$mt_tools_portfolio_advanced = new_cmb2_box( array(
			'id'            => 'meanthemes_portfolio_advanced',
			'title'      => __( 'Portfolio Advanced Options', 'meanthemes' ),
			'object_types'  => array( 'portfolio' ),
			'context'    => 'normal',
			'priority'   => 'high',
			'show_names' => true,
		) );

		$mt_tools_portfolio_advanced->add_field( array(
			'name' => __( 'Video Embed Code (Optional)', 'meanthemes' ),
			'desc' => __( 'Copy and paste your video embed code here', 'meanthemes' ),
			'id'   => $portfolioprefix . 'embed_code',
			'type' => 'textarea_code',
		) );

		$mt_tools_portfolio_advanced->add_field( array(
			'name' => __( 'Make Slider into a slideshow', 'meanthemes' ),
			'desc' => __( 'You need to add your slides below', 'meanthemes' ),
			'id'   => $portfolioprefix . 'slideshow',
			'type' => 'checkbox',
		) );

		$mt_tools_portfolio_advanced->add_field( array(
			'name' => __( 'Slideshow interval', 'meanthemes' ),
			'desc' => __( 'You need to add your slides below and tick the option above', 'meanthemes' ),
			'id'   => $portfolioprefix . 'slideshow_interval',
			'default' => '7000',
			'type' => 'text',
		) );

		$mt_tools_portfolio_advanced->add_field( array(
			'id'          => $portfolioprefix . 'services',
			'type'        => 'group',
			'description' => __( 'Add as many services in here as you like', 'meanthemes' ),
			'options'     => array(
				'group_title'   => __( 'Service {#}', 'meanthemes' ), // {#} gets replaced by row number
				'add_button'    => __( 'Add Service', 'meanthemes' ),
				'remove_button' => __( 'Remove Service', 'meanthemes' ),
				'sortable'      => true,
			),
			// Fields array works the same, except id's only need to be unique for this group. Prefix is not needed.
			'fields'      => array(
				array(
					'name' => __( 'Choose an Icon', 'meanthemes' ),
					'id'   => 'service_icon',
					'type'    => 'select',
					'description' => __( 'We use <a href="http://fortawesome.github.io/Font-Awesome/" target="_blank">FontAwesome Icons</a> for the testimonials, please visit that link, find the icon you want and find the icon name in this link.', 'meanthemes' ),
					'options' => $icons = meanthemes_tools_fa_icons_list(),
				),
				array(
					'name' => __( 'Service Label', 'meanthemes' ),
					'id'   => 'service_label',
					'type' => 'text',
				),
				array(
					'name' => __( 'Service Content', 'meanthemes' ),
					'id'   => 'service_content',
					'type' => 'text',
				),
				array(
					'name' => __( 'Service Content Link (Optional)', 'meanthemes' ),
					'description' => __( 'Add the link in here to convert the Service Content into a link (include http:// or https://)', 'meanthemes' ),
					'id'   => 'service_url',
					'type' => 'text_url',
				),
		),
		) );

		$mt_tools_portfolio_advanced->add_field( array(
			'id'          => $portfolioprefix . 'slider',
			'type'        => 'group',
			'description' => __( 'Add as many slides in here as you like', 'meanthemes' ),
			'options'     => array(
				'group_title'   => __( 'Slide {#}', 'meanthemes' ), // {#} gets replaced by row number
				'add_button'    => __( 'Add Slide', 'meanthemes' ),
				'remove_button' => __( 'Remove Slide', 'meanthemes' ),
				'sortable'      => true,
			),
			// Fields array works the same, except id's only need to be unique for this group. Prefix is not needed.
			'fields'      => array(
				array(
					'name' => __( 'Slide Image', 'meanthemes' ),
					'id'   => 'slide_image',
					'type' => 'file',
				),
			),
		) );
} // end support


				// Get Book details from Literary Custom Meta if it exists

				// Book Post Formats
				$book_prefix = '_book_';

				// Check Theme Options for Literary Book Details
				if ( get_option( 'use_literary_book_details' ) === '1' ) {

												$mt_tools_books = new_cmb2_box( array(
													'id'            => 'meanthemes_tools_custom_meta_book_literary',
													'title'      => __( 'Book Details', 'meanthemes' ),
													'object_types'  => array( 'book' ),
													'context'    => 'normal',
													'priority'   => 'high',
													'show_names' => false,
												) );

												$mt_tools_books->add_field( array(
													'name' => __( 'Book Details', 'meanthemes' ),
													'desc' => __( 'Enter all the book details in here, including shortcodes, this will appear below the featured image when you publish this out', 'meanthemes' ),
													'id'   => 'book_details',
													'type' => 'wysiwyg'
												) );

							} else {

										$mt_tools_books = new_cmb2_box( array(
											'id'            => 'meanthemes_tools_custom_meta_book_preface',
											'title'      => __( 'Book Details', 'meanthemes' ),
											'object_types'  => array( 'book' ),
											'context'    => 'normal',
											'priority'   => 'high',
											'show_names' => false,
										) );

										$mt_tools_books->add_field( array(
											'name' => __( 'Book Details', 'meanthemes' ),
											'desc' => __( 'Enter all the book details in here, including shortcodes, this will appear below the featured image when you publish this out', 'meanthemes' ),
											'id'   => $book_prefix . 'details',
											'type' => 'wysiwyg'
										) );
							}



				// Book Launch Template
				$book_launch_prefix = '_book_launch_';

				$mt_tools_book_launch = new_cmb2_box( array(
					'id'         => 'meanthemes_tools_custom_meta_book_launch',
					'title'      => __( 'Book Launch Details', 'meanthemes' ),
					'object_types'  => array( 'page' ),
					'context'    => 'normal',
					'priority'   => 'high',
					'show_names' => true,
				) );

				$mt_tools_book_launch->add_field( array(
					'name' => __( 'Intro Line', 'meanthemes' ),
					'desc' => __( 'This goes before the main title', 'meanthemes' ),
					'id'   => $book_launch_prefix . 'intro_text',
					'type' => 'text',
					'default'	=> __( 'Introducing...', 'meanthemes' ),
				) );

				$mt_tools_book_launch->add_field( array(
					'name' => __( 'Background Image', 'meanthemes' ),
					'desc' => __( 'Upload a page background image here', 'meanthemes' ),
					'id'   => $book_launch_prefix . 'bg_image',
					'type' => 'file',
				) );

				$mt_tools_book_launch->add_field( array(
					'name' => __( 'Author Details', 'meanthemes' ),
					'desc' => __( 'Enter all the author information here', 'meanthemes' ),
					'id'   => $book_launch_prefix . 'author_info',
					'type' => 'wysiwyg',
				) );


				if ( ( current_theme_supports( 'meanthemes_portfolio_enhanced' ) ) ) {

					$portfolio_enhanced_prefix = '_portfolio_enhanced_';

					$mt_tools_portfolio_enhanced = new_cmb2_box( array(
						'id'         => 'meanthemes_tools_custom_meta_portfolio_enhanced',
						'title'      => __( 'Portfolio: Enhanced Options', 'meanthemes' ),
						'object_types'  => array( 'portfolio' ),
						'context'    => 'normal',
						'priority'   => 'high',
						'show_names' => true,
					) );

					$mt_tools_portfolio_enhanced->add_field( array(
						'name' => __( 'Gallery Images' , 'meanthemes' ),
						'desc' => __( 'Uploading images here will convert the featured image area into a Flexslider' , 'meanthemes' ),
						'button' => __( 'Upload images to slider' , 'meanthemes' ), // Optionally set button label
						'id'   => $portfolio_enhanced_prefix . 'gallery_images',
						'type' => 'pw_gallery',
						'sanitization_cb' => 'pw_gallery_field_sanitise',
					) );

					$mt_tools_portfolio_enhanced->add_field( array(
						'name' => __( 'Video' , 'meanthemes' ),
						'desc' => __( 'Embedding a video here will convert the featured image area into a single video, this overrides the gallery functionality above as well.' , 'meanthemes' ),
						'id'   => $portfolio_enhanced_prefix . 'video_embed',
						'type' => 'textarea_code',
					) );

				}



				if ( ( current_theme_supports( 'meanthemes_team_support' ) ) ) {

					$team_prefix = '_team_';

					$mt_tools_team = new_cmb2_box( array(
						'id'         => 'meanthemes_team_support',
						'title'      => __( 'Team: Options', 'meanthemes' ),
						'object_types'  => array( 'team' ),
						'context'    => 'normal',
						'priority'   => 'high',
						'show_names' => true,
					) );

					$mt_tools_team->add_field( array(
						'name' => __( 'Position', 'meanthemes' ),
						'desc' => __( 'For example, Creative Director', 'meanthemes' ),
						'id'   => $team_prefix . 'position',
						'type' => 'text',
					) );

					$mt_tools_team->add_field( array(
						'name' => __( 'Social Icons', 'meanthemes' ),
						'desc' => __( 'Use the "Shortcodes" dropdown above to insert social icons', 'meanthemes' ),
						'id'   => $team_prefix . 'icons',
						'type' => 'wysiwyg',
						'options' => array(
							'wpautop' => true, // use wpautop?
							'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
						),
					) );
				}

				// Slider Options
				if ( ( current_theme_supports( 'meanthemes_slider_support' ) ) ) {

					$slider_prefix = '_slider_';

					$mt_tools_slider = new_cmb2_box( array(
						'id'         => 'meanthemes_slider_support',
						'title'      => __( 'Slider: Options', 'meanthemes' ),
						'object_types'  => array( 'slider' ),
						'context'    => 'normal',
						'priority'   => 'high',
						'show_names' => true,
					) );

					$mt_tools_slider->add_field( array(
						'name' => __( 'Button text', 'meanthemes' ),
						'description' => __( 'If you enter the text and link below a button will appear on the slider.', 'meanthemes' ),
						'id'   => $slider_prefix . 'button_text',
						'type' => 'text',
					) );

					$mt_tools_slider->add_field( array(
						'name' => __( 'Button link', 'meanthemes' ),
						'description' => __( 'Full URL here please', 'meanthemes' ),
						'id'   => $slider_prefix . 'button_link',
						'type' => 'text',
					) );

					$mt_tools_slider->add_field( array(
						'name' => __( 'Button color', 'meanthemes' ),
						'id'   => $slider_prefix . 'button_color',
						'type' => 'colorpicker',
						'default' => '#009ae9'
					) );

				}

				// Logo Options
				if ( ( current_theme_supports( 'meanthemes_logo_support' ) ) ) {

					$logo_prefix = '_logo_';

					$mt_tools_logo = new_cmb2_box( array(
						'id'         => 'meanthemes_logo_support',
						'title'      => __( 'Logo: Options', 'meanthemes' ),
						'object_types'  => array( 'logo' ),
						'context'    => 'normal',
						'priority'   => 'high',
						'show_names' => true,
					) );

					$mt_tools_logo->add_field( array(
						'name' => __( 'Logo link', 'meanthemes' ),
						'description' => __( 'Full URL here please', 'meanthemes' ),
						'id'   => $logo_prefix . 'link',
						'type' => 'text',
					) );

				}


				// Featured Image options
				if ( ( current_theme_supports( 'meanthemes_tools_image_options' ) ) ) {

					$image_options_prefix = '_mt_';

					$mt_tools_featured_image_options = new_cmb2_box( array(
						'id'         => 'meanthemes_image_options',
						'title'      => __( 'Featured Image: Options', 'meanthemes' ),
						'object_types'  => array( 'post', 'page' ),
						'context'    => 'normal',
						'priority'   => 'high',
						'show_names' => true,
					) );

					$mt_tools_featured_image_options->add_field( array(
						'name'    => __( 'Hide Featured image', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_hide_override',
						'type'    => 'select',
						'default'	=> '3',
						'options' => array(
							'3'     => __( 'Using Global Option', 'meanthemes' ),
							'off'     => __( 'No', 'meanthemes' ),
							'on'     => __( 'Yes', 'meanthemes' ),
						),
					) );

					$mt_tools_featured_image_options->add_field( array(
						'name'    => __( 'Use Parallax Effect', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_parallax_override',
						'description' => __( 'Only use these feature if background positioning is set to Center Center in the options below or the theme customizer' , 'meanthemes' ),
						'type'    => 'select',
						'default'	=> '3',
						'options' => array(
							'3'     => __( 'Using Global Option', 'meanthemes' ),
							'off'     => __( 'No', 'meanthemes' ),
							'on'     => __( 'Yes', 'meanthemes' ),
						),
					) );

					$mt_tools_featured_image_options->add_field( array(
						'name'    => __( 'Fade title area on scroll', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_fade_override',
						'type'    => 'select',
						'default'	=> '3',
						'options' => array(
							'3'     => __( 'Using Global Option', 'meanthemes' ),
							'off'     => __( 'No', 'meanthemes' ),
							'on'     => __( 'Yes', 'meanthemes' ),
						),
					) );

					$mt_tools_featured_image_options->add_field( array(
						'name'    => __( 'Position Title Overlay', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_overlay_override',
						'type'    => 'select',
						'description' => __( 'Selecting "None" will show the title in the post content area instead', 'meanthemes' ),
						'default'	=> '3',
						'options' => array(
							'3'     => __( 'Using Global Option', 'meanthemes' ),
							'default'     => __( 'Bottom Left', 'meanthemes' ),
							'centre'     => __( 'Centered', 'meanthemes' ),
							'none'     => __( 'None (Hide it)', 'meanthemes' ),
						),
					) );

					$mt_tools_featured_image_options->add_field( array(
						'name'    => __( 'Make Featured Image Full height', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_full_override',
						'type'    => 'select',
						'description' => __( 'Leave the image heights blank below if you choose Yes', 'meanthemes' ),
						'default'	=> '3',
						'options' => array(
							'3'     => __( 'Using Global Option', 'meanthemes' ),
							'off'     => __( 'No', 'meanthemes' ),
							'on'     => __( 'Yes', 'meanthemes' ),
						),
					) );

					$mt_tools_featured_image_options->add_field( array(
						'name'    => __( 'Featured image height (Mobile)', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_height_mobile_override',
						'description' => __( 'Leave blank for the default 370px', 'meanthemes' ),
						'type'    => 'text'
					) );

					$mt_tools_featured_image_options->add_field( array(
						'name'    => __( 'Featured image height (Tablet)', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_height_tablet_override',
						'description' => __( 'Leave blank for the default 500px', 'meanthemes' ),
						'type'    => 'text'
					) );

					$mt_tools_featured_image_options->add_field( array(
						'name'    => __( 'Featured image height (Desktop)', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_height_desktop_override',
						'description' => __( 'Leave blank for the default 700px', 'meanthemes' ),
						'type'    => 'text'
					) );

					$mt_tools_featured_image_options->add_field( array(
						'name'    => __( 'Featured image position', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_position_override',
						'type'    => 'select',
						'description' => __( 'If you want to use the parallax feature make sure this is set to Center Center in the options above or the theme customizer' , 'meanthemes' ),
						'default'	=> '3',
						'options' => array(
							'3'     => __( 'Using Global Option', 'meanthemes' ),
							'top center'     => __( 'Top Center', 'meanthemes' ),
							'top left'     => __( 'Top Left', 'meanthemes' ),
							'top right'     => __( 'Top Right', 'meanthemes' ),
							'center center'     => __( 'Center Center', 'meanthemes' ),
							'center left'     => __( 'Center Left', 'meanthemes' ),
							'center right'     => __( 'Center Right', 'meanthemes' ),
							'bottom center'     => __( 'Bottom Center', 'meanthemes' ),
							'bottom left'     => __( 'Bottom Left', 'meanthemes' ),
							'bottom right'     => __( 'Bottom Right', 'meanthemes' ),
						),
					) );

					$mt_tools_featured_image_options->add_field( array(
						'name'    => __( 'Set Black Overlay Opacity', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_opacity_override',
						'type'    => 'select',
						'default'	=> '3',
						'options' => array(
							'3'     => __( 'Using Global Option', 'meanthemes' ),
							'0.0'     => __( '0', 'meanthemes' ),
							'0.1'     => __( '10%', 'meanthemes' ),
							'0.2'     => __( '20%', 'meanthemes' ),
							'0.3'     => __( '30%', 'meanthemes' ),
							'0.4'     => __( '40%', 'meanthemes' ),
							'0.5'     => __( '50%', 'meanthemes' ),
							'0.6'     => __( '60%', 'meanthemes' ),
							'0.7'     => __( '70%', 'meanthemes' ),
							'0.8'     => __( '80%', 'meanthemes' ),
							'0.9'     => __( '90%', 'meanthemes' ),
						),
					) );

				} // end meanthemes_tools_image_options

				if ( ( current_theme_supports( 'meanthemes_tools_image_options_hide' ) ) ) {

					$image_options_prefix = '_mt_';

					$mt_tools_featured_image_options_hide = new_cmb2_box( array(
						'id'         => 'meanthemes_image_options_hide',
						'title'      => __( 'Featured Image: Options', 'meanthemes' ),
						'object_types'  => array( 'post', 'page' ),
						'context'    => 'side',
						'priority'   => 'low',
						'show_names' => true,
					) );

					$mt_tools_featured_image_options_hide->add_field( array(
						'name'    => __( 'Hide Featured image', 'meanthemes' ),
						'id'      => $image_options_prefix . 'post_image_hide_override',
						'type'    => 'select',
						'default'	=> '3',
						'options' => array(
							'3'     => __( 'Using Global Option', 'meanthemes' ),
							'off'     => __( 'No', 'meanthemes' ),
							'on'     => __( 'Yes', 'meanthemes' ),
						),
					) );

				} // end meanthemes_image_options_hide

				if ( ( current_theme_supports( 'meanthemes_tools_sidebar_gallery_portfolio' ) ) ) {

					$sidebar_gallery = '_mt_';

					$meanthemes_tools_sidebar_gallery = new_cmb2_box( array(
						'id'         => 'meanthemes_tools_sidebar_gallery',
						'title'      => __( 'Sidebar Gallery: Options', 'meanthemes' ),
						'object_types'  => array( 'portfolio' ),
						'context'    => 'side',
						'priority'   => 'low',
						'show_names' => false,
					) );

					$meanthemes_tools_sidebar_gallery->add_field( array(
						'name' => __( 'Sidebar Gallery Images' , 'meanthemes' ),
						'desc' => __( 'Uploading images here will show in the sidebar of this page, each image will be clickable by the website visitor into a mobile friendly overlay lightbox.<br><br> <strong>If you clear the images, you will need to Update the page for the changes to take effect.</strong>' , 'meanthemes' ),
						'button' => __( 'Sidebar Gallery Images' , 'meanthemes' ), // Optionally set button label
						'id'   => $sidebar_gallery . 'sidebar_gallery',
						'type' => 'pw_gallery',
						'sanitization_cb' => 'pw_gallery_field_sanitise',
					) );


				} // end $meanthemes_tools_sidebar_gallery

				if ( ( current_theme_supports( 'meanthemes_tools_twitter_comments' ) ) ) {

					// Only show this if Twitter comments are actually on.
					if ( get_option( 'mt_social_comments_twitter' ) === '1' ) {

							$twitter_comments = '_mt_';

							$meanthemes_tools_twitter_comments = new_cmb2_box( array(
								'id'         => 'mt_social_comments_twitter',
								'title'      => __( 'Twitter Comment Area: Options', 'meanthemes' ),
								'object_types'  => array( 'post' ),
								'context'    => 'side',
								'priority'   => 'low',
							) );

							$meanthemes_tools_twitter_comments->add_field( array(
								'name' => __( 'Twitter via @name' , 'meanthemes' ),
								'desc' => __( 'Enter via override if it is different from what you have setup in Appearance &gt; Customize (no @ needed).' , 'meanthemes' ),
								'id'   => $twitter_comments . 'social_twitter_via_override',
								'type' => 'text',
							) );

							$meanthemes_tools_twitter_comments->add_field( array(
								'name' => __( 'Hashtags' , 'meanthemes' ),
								'desc' => __( 'Hashtags you want associated with this post (comma separated).' , 'meanthemes' ),
								'id'   => $twitter_comments . 'social_twitter_hashtags',
								'type' => 'text',
							) );

						}


				} // end $meanthemes_tools_twitter_comments




}


/**
 * Get the bootstrap! If using the plugin from wordpress.org, REMOVE THIS!
 */
if ( file_exists( dirname( __FILE__ ) . '/cmb2/init.php' ) ) {
	require_once dirname( __FILE__ ) . '/cmb2/init.php';
} elseif ( file_exists( dirname( __FILE__ ) . '/CMB2/init.php' ) ) {
	require_once dirname( __FILE__ ) . '/CMB2/init.php';
}

if ( file_exists( dirname( __FILE__ ) . '/cmb-field-gallery/cmb-field-gallery.php' ) ) {
	require_once dirname( __FILE__ ) . '/cmb-field-gallery/cmb-field-gallery.php';
}


?>