<?php
/*
 * MultiShop Theme Customizer.
 */

$header_footer = array();
$content = array();
$pages = array();
//$colors_primary = '';
if (current_user_can( 'manage_options' )) {
	//$colors_primary = get_theme_mod('colors_primary', '#111616');

	$header_footer = motor_get_posts( array( 'posts_per_page' => -1, 'post_type' => 'motor_header', 'post_status'=>'any' ));
	$header_footer[0] = esc_html__('Choose', 'motor');

	$content = motor_get_posts( array( 'posts_per_page' => -1, 'post_type' => 'motor_content', 'post_status'=>'any' ));
	$content[0] = esc_html__('Choose', 'motor');

	$pages = motor_get_posts( array( 'posts_per_page' => -1, 'post_type' => 'page', 'post_status'=>'any' ));
	$pages[0] = esc_html__('Choose', 'motor');
}


/*
 * Add the theme configuration
 */
motor_options::add_config( 'motor', array(
	'option_type' => 'theme_mod',
	'capability'  => 'edit_theme_options',
) );



/*
 * Header
 */

motor_options::add_section( 'motor_header', array(
	'title'      => esc_attr__( 'Header', 'motor' ),
	'priority'   => 1,
	'capability' => 'edit_theme_options',
) );

motor_options::add_field( 'motor', array(
	'type'        => 'image',
	'settings'    => 'header_logo',
	'label'       => esc_html__( 'Logotype', 'motor' ),
	'default'     => '',
	'section'     => 'motor_header',
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'header_search',
	'label'       => esc_html__( 'Search Type', 'motor' ),
	'section'     => 'motor_header',
	'default'     => 'simple',
	'multiple'    => 1,
	'choices'     => array(
		'ajax' => esc_attr__( 'AJAX Search', 'motor' ),
		'simple' => esc_attr__( 'Simple Search', 'motor' ),
		'hide' => esc_attr__( 'Hide', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'header_precreated',
	'label'       => esc_attr__( 'Precreated Header', 'motor' ),
	'section'     => 'motor_header',
	'default'     => 'header-1',
	'choices'     => array(
		'hide' => esc_html__('Hide', 'motor'),
		'header-1' => esc_html__('Precreated Header', 'motor'),
		//'header-2' => esc_html__('Header #2', 'motor'),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'multicheck',
	'settings'    => 'header_show',
	'label'       => esc_html__( 'Precreated Header - Links', 'motor' ),
	'section'     => 'motor_header',
	'default'     => array( 'compare', 'wishlist', 'profile', 'cart' ),
	'multiple'    => 1,
	'choices'     => array(
		'compare' => esc_html__('Compare Link', 'motor'),
		'wishlist' => esc_html__('Wishlist Link', 'motor'),
		'profile' => esc_html__('Profile Link', 'motor'),
		'cart' => esc_html__('Cart Link', 'motor'),
	),
) );
/*motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'header_compare',
	'label'       => esc_html__( 'Compare Link', 'motor' ),
	'description' => esc_html__( 'To remove functionality just deactivate Compare plugin', 'motor' ),
	'section'     => 'motor_header',
	'default'     => 'show',
	'multiple'    => 1,
	'choices'     => array(
		'show' => esc_attr__( 'Show', 'motor' ),
		'hide' => esc_attr__( 'Hide', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'header_wishlist',
	'label'       => esc_html__( 'Wishlist Link', 'motor' ),
	'description' => esc_html__( 'To remove functionality just deactivate Wishlist plugin', 'motor' ),
	'section'     => 'motor_header',
	'default'     => 'show',
	'multiple'    => 1,
	'choices'     => array(
		'show' => esc_attr__( 'Show', 'motor' ),
		'hide' => esc_attr__( 'Hide', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'header_profile',
	'label'       => esc_html__( 'Profile Link', 'motor' ),
	'section'     => 'motor_header',
	'default'     => 'show',
	'multiple'    => 1,
	'choices'     => array(
		'show' => esc_attr__( 'Show', 'motor' ),
		'hide' => esc_attr__( 'Hide', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'header_cart',
	'label'       => esc_html__( 'Cart Link', 'motor' ),
	'section'     => 'motor_header',
	'default'     => 'show',
	'multiple'    => 1,
	'choices'     => array(
		'show' => esc_attr__( 'Show', 'motor' ),
		'hide' => esc_attr__( 'Hide', 'motor' ),
	),
) );*/
motor_options::add_field( 'motor', array(
	'type'        => 'checkbox',
	'settings'    => 'header_sticky',
	'label'       => esc_html__( 'Precreated Header - Sticky', 'motor' ),
	'section'     => 'motor_header',
	'default'     => '',
) );



$header_footer[0] = esc_html__('Choose Header', 'motor');

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'header_template',
	'label'       => esc_attr__( 'Header - GLOBAL', 'motor' ),
	'description'       => esc_attr__( 'You can set only this Global option and just leave empty options below', 'motor' ),
	'section'     => 'motor_header',
	'default'     => '',
	'choices'     => $header_footer,
) );

$header_footer[0] = esc_html__('Global Header', 'motor');

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'header_template_shop_root',
	'label'       => esc_attr__( 'Header - Shop Root page', 'motor' ),
	'description'       => esc_attr__( 'Root level of the Catalog', 'motor' ),
	'section'     => 'motor_header',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'header_template_shop_category',
	'label'       => esc_attr__( 'Header - Shop Category pages', 'motor' ),
	'description'       => esc_attr__( 'For all categories of the Catalog. You can set custom footer to the Specific category in the editing page', 'motor' ),
	'section'     => 'motor_header',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'header_template_shop_single',
	'label'       => esc_attr__( 'Header - Shop Product pages', 'motor' ),
	'description'       => esc_attr__( 'For all product pages. You can set custom footer to the Specific product in the editing page', 'motor' ),
	'section'     => 'motor_header',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'header_template_blog_root',
	'label'       => esc_attr__( 'Header - Blog Root page', 'motor' ),
	'section'     => 'motor_header',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'header_template_blog_category',
	'label'       => esc_attr__( 'Header - Blog Category pages', 'motor' ),
	'section'     => 'motor_header',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'header_template_blog_single',
	'label'       => esc_attr__( 'Header - Blog Single Post pages', 'motor' ),
	'section'     => 'motor_header',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'header_template_projects_category',
	'label'       => esc_attr__( 'Header - Projects Category pages', 'motor' ),
	'section'     => 'motor_header',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'header_template_projects_single',
	'label'       => esc_attr__( 'Header - Single Project pages', 'motor' ),
	'section'     => 'motor_header',
	'default'     => '',
	'choices'     => $header_footer,
) );



/*
 * Footer
 */
motor_options::add_section( 'motor_footer', array(
	'title'      => esc_attr__( 'Footer', 'motor' ),
	'priority'   => 3,
	'capability' => 'edit_theme_options',
) );

/*motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'footer_template',
	'label'       => esc_attr__( 'Footer Template', 'motor' ),
	'description'    => esc_html__( 'Editing in Pages', 'motor' ),
	'section'     => 'motor_footer',
	'default'     => '',
	'priority'    => 10,
	'multiple'    => 1,
	'choices'     => $pages,
) );*/

$header_footer[0] = esc_html__('Choose Footer', 'motor');

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'footer_template',
	'label'       => esc_attr__( 'Footer - GLOBAL', 'motor' ),
	'description'       => esc_attr__( 'You can set only this Global option and just leave empty options below', 'motor' ),
	'section'     => 'motor_footer',
	'default'     => '',
	'choices'     => $header_footer,
) );

$header_footer[0] = esc_html__('Global Footer', 'motor');

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'footer_template_shop_root',
	'label'       => esc_attr__( 'Footer - Shop Root page', 'motor' ),
	'description'       => esc_attr__( 'Root level of the Catalog', 'motor' ),
	'section'     => 'motor_footer',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'footer_template_shop_category',
	'label'       => esc_attr__( 'Footer - Shop Category pages', 'motor' ),
	'description'       => esc_attr__( 'For all categories of the Catalog. You can set custom footer to the Specific category in the editing page', 'motor' ),
	'section'     => 'motor_footer',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'footer_template_shop_single',
	'label'       => esc_attr__( 'Footer - Shop Product pages', 'motor' ),
	'description'       => esc_attr__( 'For all product pages. You can set custom footer to the Specific product in the editing page', 'motor' ),
	'section'     => 'motor_footer',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'footer_template_blog_root',
	'label'       => esc_attr__( 'Footer - Blog Root page', 'motor' ),
	'section'     => 'motor_footer',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'footer_template_blog_category',
	'label'       => esc_attr__( 'Footer - Blog Category pages', 'motor' ),
	'section'     => 'motor_footer',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'footer_template_blog_single',
	'label'       => esc_attr__( 'Footer - Blog Product pages', 'motor' ),
	'section'     => 'motor_footer',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'footer_template_projects_category',
	'label'       => esc_attr__( 'Footer - Projects Category pages', 'motor' ),
	'section'     => 'motor_footer',
	'default'     => '',
	'choices'     => $header_footer,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'footer_template_projects_single',
	'label'       => esc_attr__( 'Footer - Single Project pages', 'motor' ),
	'section'     => 'motor_footer',
	'default'     => '',
	'choices'     => $header_footer,
) );



/*
 * Title Block
 */

motor_options::add_section( 'motor_title', array(
	'title'      => esc_attr__( 'Title Block', 'motor' ),
	'priority'   => 3,
	'capability' => 'edit_theme_options',
) );

$header_footer[0] = esc_html__('Choose Title Block', 'motor');

$page_title_options = array('hide' => esc_html__('Hide', 'motor'), 'normal' => esc_html__('Normal', 'motor'));
if (!empty($header_footer)) {
	foreach ($header_footer as $key=>$item) {
		if (!empty($item)) {
			$page_title_options[$key] = $item;
		}
	}
}

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'title_template',
	'label'       => esc_attr__( 'Title Block - GLOBAL', 'motor' ),
	'description'       => esc_attr__( 'You can set only this Global option and just leave empty options below', 'motor' ),
	'section'     => 'motor_title',
	'default'     => 'normal',
	'choices'     => $page_title_options,
) );

$page_title_options[0] = esc_html__('Global Title Block', 'motor');

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'title_template_shop_root',
	'label'       => esc_attr__( 'Title Block - Shop Root page', 'motor' ),
	'description'       => esc_attr__( 'Root level of the Catalog', 'motor' ),
	'section'     => 'motor_title',
	'default'     => '',
	'choices'     => $page_title_options,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'title_template_shop_category',
	'label'       => esc_attr__( 'Title Block - Shop Category pages', 'motor' ),
	'description'       => esc_attr__( 'For all categories of the Catalog. You can set custom footer to the Specific category in the editing page', 'motor' ),
	'section'     => 'motor_title',
	'default'     => '',
	'choices'     => $page_title_options,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'title_template_shop_single',
	'label'       => esc_attr__( 'Title Block - Shop Product pages', 'motor' ),
	'description'       => esc_attr__( 'For all product pages. You can set custom footer to the Specific product in the editing page', 'motor' ),
	'section'     => 'motor_title',
	'default'     => '',
	'choices'     => $page_title_options,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'title_template_blog_root',
	'label'       => esc_attr__( 'Title Block - Blog Root page', 'motor' ),
	'section'     => 'motor_title',
	'default'     => '',
	'choices'     => $page_title_options,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'title_template_blog_category',
	'label'       => esc_attr__( 'Title Block - Blog Category pages', 'motor' ),
	'section'     => 'motor_title',
	'default'     => '',
	'choices'     => $page_title_options,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'title_template_blog_single',
	'label'       => esc_attr__( 'Title Block - Blog Product pages', 'motor' ),
	'section'     => 'motor_title',
	'default'     => '',
	'choices'     => $page_title_options,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'title_template_projects_category',
	'label'       => esc_attr__( 'Title Block - Projects Category pages', 'motor' ),
	'section'     => 'motor_title',
	'default'     => '',
	'choices'     => $page_title_options,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'title_template_projects_single',
	'label'       => esc_attr__( 'Title Block - Single Project pages', 'motor' ),
	'section'     => 'motor_title',
	'default'     => '',
	'choices'     => $page_title_options,
) );



/*
 * Catalog
 */
motor_options::add_section( 'motor_catalog', array(
	'title'      => esc_attr__( 'Catalog', 'motor' ),
	'priority'   => 3,
	'capability' => 'edit_theme_options',
) );

motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'catalog_viewmode',
	'label'       => esc_html__( 'Default View Mode', 'motor' ),
	'section'     => 'motor_catalog',
	'default'     => 'gallery',
	'choices'     => array(
		'gallery' => esc_attr__( 'Gallery', 'motor' ),
		'list' => esc_attr__( 'List', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'catalog_sidebar',
	'label'       => esc_html__( 'Sidebar', 'motor' ),
	'section'     => 'motor_catalog',
	'default'     => 'sticky',
	'choices'     => array(
		'sticky' => esc_attr__( 'Sticky', 'motor' ),
		'show' => esc_attr__( 'Show', 'motor' ),
		'hide' => esc_attr__( 'Hide', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'     => 'text',
	'settings' => 'catalog_listprops',
	'label'    => esc_html__( 'Catalog - Short Additional Information Rows', 'motor' ),
	'description'    => esc_html__( 'Short additional information rows count in Catalog', 'motor' ),
	'section'  => 'motor_catalog',
	'default'     => '9',
) );
motor_options::add_field( 'motor', array(
	'type'     => 'text',
	'settings' => 'catalog_prodprops',
	'label'    => esc_html__( 'Product - Short Additional Information Rows', 'motor' ),
	'description'    => esc_html__( 'Short additional information rows count in Product Page', 'motor' ),
	'section'  => 'motor_catalog',
	'default'     => '7',
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'catalog_qviewtabs',
	'label'       => esc_html__( 'Tabs in Quick view', 'motor' ),
	'section'     => 'motor_catalog',
	'default'     => 'hide',
	'choices'     => array(
		'show' => esc_attr__( 'Show', 'motor' ),
		'hide' => esc_attr__( 'Hide', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'catalog_prodtype',
	'label'       => esc_html__( 'Product Add to cart Position Type', 'motor' ),
	'section'     => 'motor_catalog',
	'default'     => 'type_1',
	'choices'     => array(
		'type_1' => esc_attr__( 'Type 1 (Grid View)', 'motor' ),
		'type_2' => esc_attr__( 'Type 2 (Standart View with more Space)', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'catalog_listinfo',
	'label'       => esc_html__( 'List View Information Button', 'motor' ),
	'section'     => 'motor_catalog',
	'default'     => 'info',
	'choices'     => array(
		'hide' => esc_attr__( 'Hide', 'motor' ),
		'info' => esc_attr__( 'Additional Information', 'motor' ),
		'desc' => esc_attr__( 'Short Description', 'motor' ),
		'both' => esc_attr__( 'Show Both', 'motor' ),
		'sku' => esc_attr__( 'Show SKU instead', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'catalog_cart',
	'label'       => esc_html__( 'Cart Template', 'motor' ),
	'section'     => 'motor_catalog',
	'default'     => 'modern',
	'choices'     => array(
		'modern' => esc_attr__( 'Modern', 'motor' ),
		'classic' => esc_attr__( 'Classic', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'catalog_request',
	'label'       => esc_html__( 'Request', 'motor' ),
	'description'       => esc_html__( 'Request button instead Add to Cart', 'motor' ),
	'section'     => 'motor_catalog',
	'default'     => 'no',
	'choices'     => array(
		'no' => esc_attr__( 'No', 'motor' ),
		'yes' => esc_attr__( 'Yes', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'     => 'text',
	'settings' => 'catalog_requestform',
	'label'    => esc_html__( 'Request Modal Form', 'motor' ),
	'description'    => esc_html__( 'Contact Form 7 shortcode', 'motor' ),
	'section'  => 'motor_catalog',
	'sanitize_callback' => 'wp_kses_post',
) );
motor_options::add_field( 'motor', array(
	'type'     => 'radio',
	'settings' => 'catalog_notroll',
	'label'    => esc_html__( 'Grid View Title Roll Over Effect', 'motor' ),
	'section'     => 'motor_catalog',
	'default'     => 'yes',
	'choices'     => array(
		'yes' => esc_attr__( 'Yes', 'motor' ),
		'no' => esc_attr__( 'No', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'     => 'radio',
	'settings' => 'catalog_grid_btninfo',
	'label'    => esc_html__( 'Grid View Additional Info Icon', 'motor' ),
	'section'     => 'motor_catalog',
	'default'     => 'no',
	'choices'     => array(
		'yes' => esc_attr__( 'Yes', 'motor' ),
		'no' => esc_attr__( 'No', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
    'type'        => 'multicheck',
    'settings'    => 'catalog_img_carousel',
    'label'       => esc_html__( 'Carousel Images', 'motor' ),
    'section'     => 'motor_catalog',
    'default'     => array(),
    'priority'    => 10,
    'choices'     => array(
        'gallery' => esc_html__('Gallery Layout', 'motor'),
        'list' => esc_html__('List Layout', 'motor'),
    )
) );




/*
 * BLOG
 */
motor_options::add_section( 'motor_blog', array(
	'title'      => esc_attr__( 'Blog', 'motor' ),
	'priority'   => 3,
	'capability' => 'edit_theme_options',
) );

motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'blog_sidebar',
	'label'       => esc_html__( 'Sidebar Blog', 'motor' ),
	'section'     => 'motor_blog',
	'default'     => 'right',
	'priority'    => 10,
	'multiple'    => 1,
	'choices'     => array(
		'hide' => esc_attr__( 'Hide', 'motor' ),
		'right' => esc_attr__( 'Right', 'motor' ),
		'left' => esc_attr__( 'Left', 'motor' ),
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'radio',
	'settings'    => 'blog_sidebar_post',
	'label'       => esc_html__( 'Sidebar Post', 'motor' ),
	'section'     => 'motor_blog',
	'default'     => 'hide',
	'priority'    => 10,
	'multiple'    => 1,
	'choices'     => array(
		'hide' => esc_attr__( 'Hide', 'motor' ),
		'right' => esc_attr__( 'Right', 'motor' ),
		'left' => esc_attr__( 'Left', 'motor' ),
	),
) );
/*motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'blog_columns',
	'label'       => esc_html__( 'Columns', 'motor' ),
	'section'     => 'motor_blog',
	'default'     => '2',
	'choices'     => array(
		'1' => '1',
		'2' => '2',
		'3' => '3',
		'4' => '4',
		'6' => '6',
	),
) );*/
motor_options::add_field( 'motor', array(
	'type'        => 'multicheck',
	'settings'    => 'blog_share',
	'label'       => esc_html__( 'Post Share', 'motor' ),
	'section'     => 'motor_blog',
	'default'     => array( 'facebook', 'twitter', 'vk', 'pinterest', 'gplus', 'linkedin', 'tumbrl' ),
	'priority'    => 10,
	'multiple'    => 1,
	'choices'     => array(
		'facebook' => esc_html__('Facebook', 'motor'),
		'twitter' => esc_html__('Twitter', 'motor'),
		'vk' => esc_html__('VK.com', 'motor'),
		'pinterest' => esc_html__('Pinterest', 'motor'),
		'gplus' => esc_html__('Google Plus', 'motor'),
		'linkedin' => esc_html__('Linkedin', 'motor'),
		'tumblr' => esc_html__('Tumblr', 'motor'),
	),
) );



/*
 * Projects
 */
motor_options::add_section( 'motor_projects', array(
    'title'      => esc_attr__( 'Projects', 'motor' ),
    'priority'   => 3,
    'capability' => 'edit_theme_options',
) );
motor_options::add_field( 'motor', array(
    'type'        => 'radio',
    'settings'    => 'projects_position',
    'label'       => esc_attr__( 'Images Position', 'motor' ),
    'section'     => 'motor_projects',
    'default'     => 'before_title',
    'choices'     => array(
        'before_title' => esc_attr__( 'Before Title', 'motor' ),
        'after_title' => esc_attr__( 'After Title', 'motor' ),
        'after_content' => esc_attr__( 'After Content', 'motor' ),
        'aside' => esc_attr__( 'Aside', 'motor' ),
    ),
) );
motor_options::add_field( 'motor', array(
    'type'        => 'radio',
    'settings'    => 'projects_width',
    'label'       => esc_attr__( 'Images Container Width', 'motor' ),
    'section'     => 'motor_projects',
    'default'     => 'full',
    'choices'     => array(
        'container' => esc_attr__( 'Container', 'motor' ),
        'full' => esc_attr__( 'Full', 'motor' ),
    ),
) );
motor_options::add_field( 'motor', array(
    'type'        => 'radio',
    'settings'    => 'projects_width_img',
    'label'       => esc_attr__( 'Images Width', 'motor' ),
    'section'     => 'motor_projects',
    'default'     => 'full',
    'choices'     => array(
        'auto' => esc_attr__( 'Auto', 'motor' ),
        'full' => esc_attr__( 'Full', 'motor' ),
    ),
) );
motor_options::add_field( 'motor', array(
    'type'        => 'radio',
    'settings'    => 'projects_type',
    'label'       => esc_attr__( 'Images Type', 'motor' ),
    'section'     => 'motor_projects',
    'default'     => 'list',
    'choices'     => array(
        'masonry' => esc_attr__( 'Masonry', 'motor' ),
        'list' => esc_attr__( 'List', 'motor' ),
        'carousel' => esc_attr__( 'Carousel', 'motor' ),
        'slider' => esc_attr__( 'Slider', 'motor' ),
    ),
) );




/*
 * AREAS
 */
motor_options::add_section( 'motor_areas', array(
	'title'      => esc_attr__( 'Shop/Blog Areas', 'motor' ),
	'priority'   => 5,
	'capability' => 'edit_theme_options',
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_root_after_title',
	'label'       => esc_attr__( 'Shop Root page - After Title', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_root_before_content',
	'label'       => esc_attr__( 'Shop Root page - Before Content', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_root_after_content',
	'label'       => esc_attr__( 'Shop Root page - After Content', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_root_sidebar',
	'label'       => esc_attr__( 'Shop Root page - Sidebar', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_root_before_footer',
	'label'       => esc_attr__( 'Shop Root page - Before Footer', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_category_after_title',
	'label'       => esc_attr__( 'Shop Category pages - After Title', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_category_before_content',
	'label'       => esc_attr__( 'Shop Category pages - Before Content', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_category_after_content',
	'label'       => esc_attr__( 'Shop Category pages - After Content', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_category_sidebar',
	'label'       => esc_attr__( 'Shop Category pages - Sidebar', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_category_before_footer',
	'label'       => esc_attr__( 'Shop Category pages - Before Title', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_single_before_content',
	'label'       => esc_attr__( 'Shop Detail Product - Before Content', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_shop_single_after_content',
	'label'       => esc_attr__( 'Shop Detail Product - After Content', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_blog_root_after_title',
	'label'       => esc_attr__( 'Blog Root page - After Title', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_blog_root_before_content',
	'label'       => esc_attr__( 'Blog Root page - Before Content', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_blog_root_after_content',
	'label'       => esc_attr__( 'Blog Root page - After Content', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_blog_root_sidebar',
	'label'       => esc_attr__( 'Blog Root page - Sidebar', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
    'type'        => 'select',
    'settings'    => 'areas_blog_root_before_footer',
    'label'       => esc_attr__( 'Blog Root page - Before Footer', 'motor' ),
    'section'     => 'motor_areas',
    'default'     => '',
    'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_blog_category_after_title',
	'label'       => esc_attr__( 'Blog Category pages - After Title', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_blog_category_before_content',
	'label'       => esc_attr__( 'Blog Category pages - Before Content', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_blog_category_after_content',
	'label'       => esc_attr__( 'Blog Category pages - After Content', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_blog_category_sidebar',
	'label'       => esc_attr__( 'Blog Category pages - Sidebar', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );

motor_options::add_field( 'motor', array(
	'type'        => 'select',
	'settings'    => 'areas_blog_category_before_footer',
	'label'       => esc_attr__( 'Blog Category pages - Before Footer', 'motor' ),
	'section'     => 'motor_areas',
	'default'     => '',
	'choices'     => $content,
) );





/*
 * COLORS
 */
motor_options::add_section( 'motor_color', array(
	'title'      => esc_attr__( 'Colors', 'motor' ),
	'priority'   => 4,
	'capability' => 'edit_theme_options',
) );

motor_options::add_field( 'motor', array(
	'type'        => 'color',
	'settings'    => 'color_primary',
	'label'       => __( 'Main color', 'motor' ),
	'description' => __( 'Default color: #ff3100', 'motor' ),
	'section'     => 'motor_color',
	'default'     => '#ff3100',
	'priority'    => 10,
	'choices'     => array(
		'alpha' => true,
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'color',
	'settings'    => 'color_body',
	'label'       => __( 'Body Background', 'motor' ),
	'description' => __( 'Default color: #f4f5fb', 'motor' ),
	'section'     => 'motor_color',
	'default'     => '#f4f5fb',
	'priority'    => 10,
	'choices'     => array(
		'alpha' => true,
	),
) );
motor_options::add_field( 'motor', array(
	'type'        => 'color',
	'settings'    => 'color_header',
	'label'       => __( 'Header Background', 'motor' ),
	'description' => __( 'Default color: #18202e', 'motor' ),
	'section'     => 'motor_color',
	'default'     => '#18202e',
	'priority'    => 10,
	'choices'     => array(
		'alpha' => true,
	),
) );




/*
 * FONTS
 */
motor_options::add_section( 'motor_fonts', array(
	'title'      => esc_attr__( 'Fonts', 'motor' ),
	'priority'   => 4,
	'capability' => 'edit_theme_options',
) );

motor_options::add_field( 'motor', array(
	'type'        => 'typography',
	'settings'    => 'fonts_main',
	'label'       => esc_html__( 'Main Font', 'motor' ),
	'description'       => esc_html__( 'Default: Open Sans', 'motor' ),
	'section'     => 'motor_fonts',
	'default'     => array(
		'font-family'    => 'Open Sans',
		'variant'        => '400',
		'font-size'      => '15px',
		'line-height'    => '1.8',
		'letter-spacing' => '0px',
		'text-transform' => 'none',
		'text-align'     => 'left',
		'color'          => '#868ca7',
		'subsets'        => array(),
	),
	'priority'    => 10,
) );
motor_options::add_field( 'motor', array(
	'type'        => 'typography',
	'settings'    => 'fonts_main_ttl',
	'label'       => esc_html__( 'Main Title Font', 'motor' ),
	'description'       => esc_html__( 'Default: "Montserrat", 30px, Weight 900, #373d54, Line Height 1.1, Text-transform "Uppercase", Letter-spacing 0.05em', 'motor' ),
	'section'     => 'motor_fonts',
	'default'     => array(
		'font-family'    => 'Montserrat',
		'variant'        => '900',
		'font-size'      => '30px',
		'line-height'    => '1.1',
		'letter-spacing' => '0.05em',
		'subsets'        => array(),
		'text-transform' => 'uppercase',
		'color'          => '#283346',
		/*'text-align'     => 'left'*/
	),
	'priority'    => 10,
) );
motor_options::add_field( 'motor', array(
	'type'        => 'typography',
	'settings'    => 'fonts_normal_ttl',
	'label'       => esc_html__( 'Normal Title Font', 'motor' ),
	'description'       => esc_html__( 'Default: "Montserrat", 30px, Weight 700, #373d54, Line Height 1.1, Text-transform "Uppercase", Letter-spacing 0.05em', 'motor' ),
	'section'     => 'motor_fonts',
	'default'     => array(
		'font-family'    => 'Montserrat',
		'variant'        => '700',
		/*'font-size'      => '30px',*/
		/*'line-height'    => '1.1',*/
		'letter-spacing' => '0px',
		'subsets'        => array(),
		'text-transform' => 'none',
		'color'          => '#283346',
		/*'text-align'     => 'left'*/
	),
	'priority'    => 10,
) );



/*
 * OTHER
 */
motor_options::add_section( 'motor_other', array(
	'title'      => esc_attr__( 'Other', 'motor' ),
	'priority'   => 3,
	'capability' => 'edit_theme_options',
) );

motor_options::add_field( 'motor', array(
	'type'     => 'text',
	'settings' => 'other_modalform',
	'label'       => esc_html__( 'Modal Form', 'motor' ),
	'description'       => esc_html__( 'Contact Form 7 Shortcode', 'motor' ),
	'section'  => 'motor_other',
	'sanitize_callback' => 'wp_kses_post',
	'default'     => '',
	'priority' => 10,
) );

motor_options::add_field( 'motor', array(
    'type'        => 'checkbox',
    'settings'    => 'other_preloader',
    'label'       => esc_html__( 'Show Preloader', 'motor' ),
    'section'     => 'motor_other',
    'default'     => '',
) );
