<?php

add_action( 'cmb2_admin_init', 'progression_studios_page_header_meta_box' );
function progression_studios_page_header_meta_box() {

	// Start with an underscore to hide fields from custom fields list
	$prefix = 'progression_studios_';

	/**
	 * Sample metabox to demonstrate each field type included
	 */
	$progression_studios_cmb_demo = new_cmb2_box( array(
		'id'            => $prefix . 'metabox_page_header',
		'title'         => esc_html__('Page Settings', 'protege-progression'),
		'object_types'  => array( 'page' ), // Post type,
	) );
	
	$progression_studios_cmb_demo->add_field( array(
		'name'       => esc_html__('Sub-title', 'protege-progression'),
		'id'         => $prefix . 'sub_title',
		'type'       => 'text',
	) );

	$progression_studios_cmb_demo->add_field( array(
		'name'       => esc_html__('Sidebar Display', 'protege-progression'),
		
		'id'         => $prefix . 'page_sidebar',
		'type'       => 'select',
		'options'     => array(
			'right-sidebar'    => esc_html__( 'Right Sidebar', 'protege-progression' ),
			'left-sidebar'    => esc_html__( 'Left Sidebar', 'protege-progression' ),
			'hidden-sidebar'   => esc_html__( 'Hide Sidebar', 'protege-progression' ), 
		),
	) );
	
	$progression_studios_cmb_demo->add_field( array(
		'name' => esc_html__('Page Title Background Image', 'protege-progression'),
		'id'         => $prefix . 'header_image',
		'type'         => 'file',
		'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )
	) );
	
	$progression_studios_cmb_demo->add_field( array(
		'name'       => esc_html__('Disable Page Title', 'protege-progression'),
		'id'         => $prefix . 'disable_page_title',
		'type'       => 'checkbox',
	) );
	
	$progression_studios_cmb_demo->add_field( array(
		'name'       => esc_html__('Disable Logo on page', 'protege-progression'),
		'id'         => $prefix . 'disable_logo',
		'type'       => 'checkbox',
	) );
	
	$progression_studios_cmb_demo->add_field( array(
		'name'       => esc_html__('Display Boxed Navigation', 'protege-progression'),
		'id'         => $prefix . 'boxed_navigation',
		'type'       => 'checkbox',
	) );
	
	
	$progression_studios_cmb_demo->add_field( array(
		'name'       => esc_html__('Force Header Transparent', 'protege-progression'),
		'id'         => $prefix . 'header_transparent',
		'type'       => 'checkbox',
	) );
	
}





add_action( 'cmb2_admin_init', 'progression_studios_post_meta_box' );
function progression_studios_post_meta_box() {

	// Start with an underscore to hide fields from custom fields list
	$prefix = 'progression_studios_';

	/**
	 * Sample metabox to demonstrate each field type included
	 */
	$progression_studios_cmb_demo = new_cmb2_box( array(
		'id'            => $prefix . 'metabox_post',
		'title'         => esc_html__('Post Settings', 'protege-progression'),
		'object_types'  => array( 'post' ), // Post type
	) );
	
	
	$progression_studios_cmb_demo->add_field( array(
		'name' => esc_html__('Image Gallery', 'protege-progression'),
		'desc' => esc_html__('Add-in images to display a gallery.', 'protege-progression'),
		'id'         => $prefix . 'gallery',
		'type'         => 'file_list',
		'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )
	) );
	
	
	$progression_studios_cmb_demo->add_field( array(
		'name'       => esc_html__('Audio/Video Embed', 'protege-progression'),
		'desc'       => esc_html__('Paste in your video url or embed code', 'protege-progression'),
		'id'         => $prefix . 'video_post',
		'type'       => 'text',
	) );
	
	

	$progression_studios_cmb_demo->add_field( array(
		'name' => esc_html__('Optional Link', 'protege-progression'),
		'desc' => esc_html__('Make your post link to another page.', 'protege-progression'),
		'id'         => $prefix . 'external_link',
		'type'       => 'text',
	) );
	

}






add_action( 'cmb2_admin_init', 'progression_studios_portfolio_meta_box' );
function progression_studios_portfolio_meta_box() {

	// Start with an underscore to hide fields from custom fields list
	$prefix = 'progression_studios_';

	/**
	 * Sample metabox to demonstrate each field type included
	 */
	$progression_studios_cmb_demo = new_cmb2_box( array(
		'id'            => $prefix . 'metabox_portfolio',
		'title'         => esc_html__('Portfolio Settings', 'protege-progression'),
		'object_types'  => array( 'portfolio' ), // Post type
	) );
	
	$progression_studios_cmb_demo->add_field( array(
		'name' => esc_html__('Index Link to lightbox', 'protege-progression'),
		'desc' => esc_html__('Check box to link to larger image pop-up instead of post page. Only works for featured image and video (Not gallery)', 'protege-progression'),
		'id'         => $prefix . 'lightbox_link',
		'type'       => 'checkbox',
	) );
	
	
	$progression_studios_cmb_demo->add_field( array(
		'name' => esc_html__('Image Gallery', 'protege-progression'),
		'desc' => esc_html__('Add-in images to display a gallery.', 'protege-progression'),
		'id'         => $prefix . 'gallery',
		'type'         => 'file_list',
		'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )
	) );
	
	
	$progression_studios_cmb_demo->add_field( array(
		'name'       => esc_html__('Audio/Video Embed', 'protege-progression'),
		'desc'       => esc_html__('Paste in your video url or embed code', 'protege-progression'),
		'id'         => $prefix . 'video_post',
		'type'       => 'text',
	) );
	
	

	$progression_studios_cmb_demo->add_field( array(
		'name' => esc_html__('Optional Link', 'protege-progression'),
		'desc' => esc_html__('Make your post link to another page', 'protege-progression'),
		'id'         => $prefix . 'external_link',
		'type'       => 'text',
	) );
	
	$progression_studios_cmb_demo->add_field( array(
		'name' => esc_html__('Post Title Background Image', 'protege-progression'),
		'id'         => $prefix . 'header_image',
		'type'         => 'file',
		'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )
	) );
	

}

