File "custom-meta.php"

Full Path: /home/flipjqml/onlinebetsolution.com/wp-content/plugins/progression-elements-xion/inc/custom-meta.php
File size: 8.26 KB
MIME-type: text/x-php
Charset: utf-8

<?php

add_action( 'cmb2_admin_init', 'progression_studios_page_meta_box' );
function progression_studios_page_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 = new_cmb2_box( array(
		'id'            => $prefix . 'metabox_page_settings',
		'title'         => esc_html__('Page Settings', 'progression-elements-xion'),
		'object_types'  => array( 'page' ), // Post type,
	) );
	
	
	$progression_studios_cmb->add_field( array(
		'name'       => esc_html__('Sub-title', 'progression-elements-xion'),
		'id'         => $prefix . 'sub_title',
		'type'       => 'text',
	) );

	$progression_studios_cmb->add_field( array(
		'name'       => esc_html__('Sidebar Display', 'progression-elements-xion'),
		'id'         => $prefix . 'page_sidebar',
		'type'       => 'select',
		'options'     => array(
			'hidden-sidebar'   => esc_html__( 'Hide Sidebar', 'progression-elements-xion' ),
			'right-sidebar'    => esc_html__( 'Right Sidebar', 'progression-elements-xion' ),
			'left-sidebar'    => esc_html__( 'Left Sidebar', 'progression-elements-xion' ),
		),
	) );
	
	$progression_studios_cmb->add_field( array(
		'name' => esc_html__('Page Title Background Image', 'progression-elements-xion'),
		'id'         => $prefix . 'header_image',
		'type'         => 'file',
		'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )
	) );
	
	$progression_studios_cmb->add_field( array(
		'name'       => esc_html__('Disable Page Title', 'progression-elements-xion'),
		'id'         => $prefix . 'disable_page_title',
		'type'       => 'checkbox',
	) );
	
}



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 = new_cmb2_box( array(
		'id'            => $prefix . 'metabox_page_header',
		'title'         => esc_html__('Header Settings', 'progression-elements-xion'),
		'object_types'  => array( 'page' ), // Post type,
	) );
	
	
	$progression_studios_cmb->add_field( array(
		'name'       => esc_html__('Navigation Text Color', 'progression-elements-xion'),
		'id'         => $prefix . 'custom_page_nav_color',
		'type'       => 'select',
		'options'     => array(
			'progression_studios_default_navigation_color'    => esc_html__( 'Default Color', 'progression-elements-xion' ),
			'progression_studios_force_dark_navigation_color'    => esc_html__( 'Force Text Black', 'progression-elements-xion' ),
			'progression_studios_force_light_navigation_color'   => esc_html__( 'Force Text White', 'progression-elements-xion' ), 
		),
	) );

	
	$progression_studios_cmb->add_field( array(
		'name'       => esc_html__('Force Transparent Header', 'progression-elements-xion'),
		'id'         => $prefix . 'header_transparent_float',
		'type'       => 'checkbox',
	) );
	
	
	$progression_studios_cmb->add_field( array(
		'name' => esc_html__('Custom logo for page', 'progression-elements-xion'),
		'desc' => esc_html__('Must be same size as the main logo.', 'progression-elements-xion'),
		'id'         => $prefix . 'custom_page_logo',
		'type'         => 'file',
		'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )
	) );
	
	
	$progression_studios_cmb->add_field( array(
		'name'       => esc_html__('Disable Header', 'progression-elements-xion'),
		'id'         => $prefix . 'header_disabled',
		'type'       => 'checkbox',
	) );
	
	$progression_studios_cmb->add_field( array(
		'name'       => esc_html__('Disable Footer', 'progression-elements-xion'),
		'id'         => $prefix . 'disable_footer_per_page',
		'type'       => 'checkbox',
	) );


	
}





add_action( 'cmb2_admin_init', 'progression_studios_index_post_meta_box' );
function progression_studios_index_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 = new_cmb2_box( array(
		'id'            => $prefix . 'metabox_post',
		'title'         => esc_html__('Post Settings', 'progression-elements-xion'),
		'object_types'  => array( 'post' ), // Post type
	) );

	$progression_studios_cmb->add_field( array(
		'name'       => esc_html__('Featured Image Link', 'progression-elements-xion'),
		'id'         => $prefix . 'blog_featured_image_link',
		'type'       => 'select',
		'options'     => array(
			'progression_link_default'   => esc_html__( 'Default link to post', 'progression-elements-xion' ), // {#} gets replaced by row number
			'progression_link_lightbox'    => esc_html__( 'Link to image in lightbox pop-up', 'progression-elements-xion' ),
			'progression_link_url'    => esc_html__( 'Link to URL', 'progression-elements-xion' ),
			'progression_link_url_new_window'    => esc_html__( 'Link to URL (New Window)', 'progression-elements-xion' ),
		),

	) );
	

	$progression_studios_cmb->add_field( array(
		'name' => esc_html__('Optional Link', 'progression-elements-xion'),
		'desc' => esc_html__('Make your post link to another page', 'progression-elements-xion'),
		'id'         => $prefix . 'external_link',
		'type'       => 'text',
	) );
	
	
	$progression_studios_cmb->add_field( array(
		'name'       => esc_html__('Video/Audio', 'progression-elements-xion'),
		'desc'       => esc_html__('Paste in your video url or embed code', 'progression-elements-xion'),
		'id'         => $prefix . 'video_post',
		'type'       => 'textarea_code',
		'options' => array( 'disable_codemirror' => true )
	) );
	

	
}


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 = new_cmb2_box( array(
		'id'            => $prefix . 'metabox_portfolio',
		'title'         => esc_html__('Post Settings', 'progression-elements-xion'),
		'object_types'  => array( 'portfolio_xion' ), // Post type
	) );

	$progression_studios_cmb->add_field( array(
		'name'       => esc_html__('Featured Image/Button Link', 'progression-elements-xion'),
		'id'         => $prefix . 'blog_featured_image_link',
		'type'       => 'select',
		'options'     => array(
			'progression_link_default'   => esc_html__( 'Default link to post', 'progression-elements-xion' ), // {#} gets replaced by row number
			'progression_link_lightbox'    => esc_html__( 'Link to image in lightbox pop-up', 'progression-elements-xion' ),
			'progression_link_url'    => esc_html__( 'Link to URL', 'progression-elements-xion' ),
			'progression_link_url_new_window'    => esc_html__( 'Link to URL (New Window)', 'progression-elements-xion' ),
		),

	) );
	

	$progression_studios_cmb->add_field( array(
		'name' => esc_html__('Optional Image/Button Link', 'progression-elements-xion'),
		'desc' => esc_html__('Make your post link to another page', 'progression-elements-xion'),
		'id'         => $prefix . 'external_link',
		'type'       => 'text',
	) );
	
	
	$progression_studios_cmb->add_field( array(
		'name' => esc_html__('Button Text', 'progression-elements-xion'),
		'id'         => $prefix . 'button_text',
		'type'       => 'text',
	) );
	
	

	
}



add_action( 'cmb2_admin_init', 'progression_studios_portfolio_taxonomy_meta_box' );
function progression_studios_portfolio_taxonomy_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 = new_cmb2_box( array(
		'id'            => $prefix . 'metabox_portfolio_tax_settings',
		'title'         => esc_html__('Post Meta', 'progression-elements-xion'),
		'object_types'     => array( 'term' ),
		'taxonomies'       => array( 'portfolio-category'),
	) );
	
	
	$progression_studios_cmb->add_field( array(
		'name' => esc_html__('Background Image', 'progression-elements-xion'),
		'id'         => $prefix . 'background_image',
		'type'         => 'file',
		'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )
	) );
	
	
	

}