<?php
/**
 * Advanced Tab
 *
 * @package Blocks
 */

$menus['advanced'] = array(
	'icon'  => 'fa-puzzle-piece',
	'title' => esc_html__( 'Advanced', 'blocks' ),
);

$menus['advanced']['child'] = array(
	'code-fields'    => array( 'title' => esc_html__( 'Code Fields (Tracking etc.)', 'blocks' ) ),
	'code-css'       => array( 'title' => esc_html__( 'Custom CSS', 'blocks' ) ),
	'theme-features' => array( 'title' => esc_html__( 'Theme Features', 'blocks' ) ),
	'dynamic-css'    => array( 'title' => esc_html__( 'Dynamic CSS', 'blocks' ) ),
);

/**
 * Code fields
 */
$sections['code-fields'] = array(

	array(
		'id'       => 'mts_header_code',
		'type'     => 'ace_editor',
		'mode'     => 'html',
		'title'    => esc_html__( 'Before &lt;/head&gt;', 'blocks' ),
		'sub_desc' => wp_kses( __( 'Enter the code which you need to place <strong>before closing &lt;/head&gt; tag</strong>. (ex: Google Webmaster Tools verification, Bing Webmaster Center, BuySellAds Script, Alexa verification etc.)', 'blocks' ), array( 'strong' => '' ) ),
	),
	array(
		'id'       => 'mts_analytics_code',
		'type'     => 'ace_editor',
		'mode'     => 'html',
		'title'    => __( 'Footer Code', 'blocks' ),
		'sub_desc' => wp_kses( __( 'Enter the codes which you need to place in your footer. <strong>(ex: Google Analytics, Clicky, STATCOUNTER, Woopra, Histats, etc.)</strong>.', 'blocks' ), array( 'strong' => '' ) ),
	),
);

/**
 * Custom CSS
 */
$sections['code-css'] = array(

	array(
		'id'       => 'mts_custom_css',
		'type'     => 'ace_editor',
		'mode'     => 'css',
		'title'    => esc_html__( 'Custom CSS', 'blocks' ),
		'sub_desc' => esc_html__( 'You can enter custom CSS code here to further customize your theme. This will override the default CSS used on your site.', 'blocks' ),
		'args'     => array(
			'minLines' => 40,
			'maxLines' => 70,
		),
	),
);

/**
 * Theme Features
 */
$sections['theme-features'] = array(

	array(
		'id'       => 'retina_images',
		'type'     => 'switch',
		'title'    => esc_html__( 'Retina Images', 'blocks' ),
		'sub_desc' => esc_html__( 'Use this button to enable/disable automatic creation of retina images.', 'blocks' ),
		'std'      => '1',
	),

	array(
		'id'       => 'images_responsive',
		'type'     => 'switch',
		'title'    => esc_html__( 'Responsive Images', 'blocks' ),
		'sub_desc' => esc_html__( 'Turn on for images to change size responsively.', 'blocks' ),
		'std'      => '0',
	),

	array(
		'id'       => 'status_opengraph',
		'type'     => 'switch',
		'title'    => esc_html__( 'Open Graph Meta Tags', 'blocks' ),
		'sub_desc' => esc_html__( 'Turn on to enable open graph meta tags which is mainly used when sharing pages on social networking sites like Facebook.', 'blocks' ),
		'std'      => '1',
	),
);

/**
 * Dynamic CSS
 */
$sections['dynamic-css'] = array(

	array(
		'id'       => 'dynamic_css_compiler',
		'type'     => 'switch',
		'title'    => esc_html__( 'CSS Compiler', 'blocks' ),
		'sub_desc' => esc_html__( 'Turn on to compile the dynamic CSS into a file. A separate file will be created for each of your pages & posts inside of the uploads/blocks-styles folder.', 'blocks' ),
		'std'      => '1',
	),

	array(
		'id'         => 'dynamic_css_db_caching',
		'type'       => 'switch',
		'title'      => esc_html__( 'Database Caching for Dynamic CSS', 'blocks' ),
		'sub_desc'   => esc_html__( 'Turn on to enable caching the dynamic CSS in your database.', 'blocks' ),
		'std'        => '0',
		'dependency' => array(
			array(
				'field'      => 'dynamic_css_compiler',
				'value'      => '0',
				'comparison' => '==',
			),
		),
	),

	array(
		'id'       => 'cache_server_ip',
		'type'     => 'text',
		'title'    => esc_html__( 'Cache Server IP', 'blocks' ),
		'sub_desc' => esc_html__( 'For unique cases where you are using cloud flare and a cache server, ex: varnish cache. Enter your cache server IP to clear the theme options dynamic CSS cache. Consult with your server admin for help.', 'blocks' ),
	),
);
