<?php
/*
 * This is the config file for the theme.
 */

define("TD_THEME_NAME", "Newsmag");
define("TD_THEME_VERSION", "4.8");
define("TD_THEME_DEMO_URL", "http://demo.tagdiv.com/" . strtolower(TD_THEME_NAME));
define("TD_THEME_DEMO_DOC_URL", 'http://forum.tagdiv.com/newsmag-introduction/');  //the url to the demo documentation
define("TD_PLUGINS_URL", 'https://cloud.tagdiv.com/td_plugins/');  //plugins url
define("TD_FEATURED_CAT", "Featured"); //featured cat name
define("TD_FEATURED_CAT_SLUG", "featured"); //featured cat slug
define("TD_THEME_OPTIONS_NAME", "td_010"); //where to store our options

define("TD_AURORA_VERSION", "__td_aurora_deploy_version__");

define("TD_THEME_WP_BOOSTER", "3.0"); //prevents multiple instances of the framework

//if no deploy mode is selected, we use the final deploy built
if (!defined('TD_DEPLOY_MODE')) {
    define("TD_DEPLOY_MODE", 'deploy');
}


switch (TD_DEPLOY_MODE) {
    default:
        //deploy version - this is the version that we ship!
        define("TD_DEBUG_LIVE_THEME_STYLE", false);
        define("TD_DEBUG_IOS_REDIRECT", false);
        define("TD_DEBUG_USE_LESS", false);
        break;

    case 'dev':
        //dev version
        define("TD_DEBUG_LIVE_THEME_STYLE", true);
        define("TD_DEBUG_IOS_REDIRECT", true);
        define("TD_DEBUG_USE_LESS", true); //use less on dev
        break;

    case 'demo':
        //demo version
        define("TD_DEBUG_LIVE_THEME_STYLE", true);
        define("TD_DEBUG_IOS_REDIRECT", true); // remove themeforest iframe from ios devices on demo only!
        define("TD_DEBUG_USE_LESS", false);
        break;
}



/**
 * speed booster v 3.0 hooks - prepare the framework for the theme
 * is also used by td_deploy - that's why it's a static class
 * Class td_wp_booster_hooks
 */
class td_config {

    /**
     * setup the global theme specific variables
     * @depends td_global
     */
    static function on_td_global_after_config() {

        /**
         * js files list
         */
        td_global::$js_files = array(
            'tdExternal' =>             '/includes/wp_booster/js_dev/tdExternal.js',
            'tdDetect' =>               '/includes/wp_booster/js_dev/tdDetect.js',

            'tdViewport' =>             '/includes/wp_booster/js_dev/tdViewport.js',

            'tdMenu' =>                 '/includes/wp_booster/js_dev/tdMenu.js',
            //'tdLocalCache' =>         '/includes/wp_booster/js_dev/tdLocalCache.js',
            'tdUtil' =>                 '/includes/wp_booster/js_dev/tdUtil.js',
            'tdAffix' =>                '/includes/wp_booster/js_dev/tdAffix.js',
            //'td_scroll_animation' =>    '/includes/wp_booster/js_dev/td_scroll_animation.js',
            'td_site' =>                '/includes/wp_booster/js_dev/td_site.js',



            'tdLoadingBox' =>           '/includes/wp_booster/js_dev/tdLoadingBox.js',
            'tdAjaxSearch' =>           '/includes/wp_booster/js_dev/tdAjaxSearch.js',
            'tdPostImages' =>           '/includes/wp_booster/js_dev/tdPostImages.js',
            'tdBlocks' =>               '/includes/wp_booster/js_dev/tdBlocks.js',
            'tdLogin' =>                '/includes/wp_booster/js_dev/tdLogin.js',
            'tdLoginMobile' =>          '/includes/wp_booster/js_dev/tdLoginMobile.js',
            'tdStyleCustomizer' =>      '/includes/wp_booster/js_dev/tdStyleCustomizer.js',
            'tdTrendingNow' =>          '/includes/wp_booster/js_dev/tdTrendingNow.js',
            'td_history' =>             '/includes/wp_booster/js_dev/td_history.js',
            'tdSmartSidebar' =>         '/includes/wp_booster/js_dev/tdSmartSidebar.js',
            'tdInfiniteLoader' =>       '/includes/wp_booster/js_dev/tdInfiniteLoader.js',
            'vimeo_froogaloop' =>       '/includes/wp_booster/js_dev/vimeo_froogaloop.js',

            'tdCustomEvents' =>         '/includes/js_files/tdCustomEvents.js',
            'tdEvents' =>               '/includes/wp_booster/js_dev/tdEvents.js',

            'tdHeader' =>               '/includes/wp_booster/js_dev/tdHeader.js',

            'tdAjaxCount' =>            '/includes/wp_booster/js_dev/tdAjaxCount.js',
            'tdVideoPlaylist' =>        '/includes/wp_booster/js_dev/tdVideoPlaylist.js',

            'td_slide' =>               '/includes/wp_booster/js_dev/td_slide.js',
            'tdPullDown' =>             '/includes/wp_booster/js_dev/tdPullDown.js',

            'tdAnimationScroll' =>      '/includes/wp_booster/js_dev/tdAnimationScroll.js',
	        'tdHomepageFull' =>         '/includes/wp_booster/js_dev/tdHomepageFull.js',
            'tdBackstr' =>              '/includes/wp_booster/js_dev/tdBackstr.js',

            'tdAnimationStack' =>       '/includes/wp_booster/js_dev/tdAnimationStack.js',
            'td_main' =>                '/includes/js_files/td_main.js',


            'td_loop_ajax' =>           '/includes/wp_booster/js_dev/tdLoopAjax.js',
            'tdWeather' =>              '/includes/wp_booster/js_dev/tdWeather.js',
            'tdLastInit' =>             '/includes/wp_booster/js_dev/tdLastInit.js',
            'tdAnimationSprite' =>      '/includes/wp_booster/js_dev/tdAnimationSprite.js',
            'tdDateI18n' =>             '/includes/wp_booster/js_dev/tdDatei18n.js',
            'tdSocialSharing'=>         '/includes/wp_booster/js_dev/tdSocialSharing.js'
        );


	    /**
	     * tdViewport intervals in crescendo order
	     */
	    td_global::$td_viewport_intervals = array(
		    array(
			    "limitBottom" => 767,
			    "sidebarWidth" => 251,
		    ),
		    array(
			    "limitBottom" => 1023,
			    "sidebarWidth" => 339,
		    )
	    );


	    /**
	     * - td animation stack effects used in the 'loading animation image' theme panel section
	     * - the first element is a special case, it representing the default type 'type0' @see animation-stack.less
	     * - the 'val' parameter is the type effect
	     * - the 'specific_selectors' parameter is the css selector used to look for new elements inside of some specific sections [ex. at ajax req]
	     * - the 'general_selectors' parameter is the css selector used to look for elements on extended sections [ex. entire page]
	     * - Important! the 'general_selectors' is not used by the default 'type0'
	     */
	    td_global::$td_animation_stack_effects = array(
		    array(
			    'text' => 'Fade [full]',
			    'val' => '', // empty, as a default value
			    'specific_selectors' => '.entry-thumb, img',
			    'general_selectors' => '.td-animation-stack img, .td-animation-stack .entry-thumb, .post img',
		    ),

		    array(
			    'text' => 'Fade & Scale',
			    'val' => 'type1',
			    'specific_selectors' => '.entry-thumb, img[class*="wp-image-"], a.td-sml-link-to-image > img',
			    'general_selectors' => '.td-animation-stack .entry-thumb, .post .entry-thumb, .post img[class*="wp-image-"], .post a.td-sml-link-to-image > img',
		    ),

		    array(
			    'text' => 'Up fade',
			    'val' => 'type2',
			    'specific_selectors' => '.entry-thumb, img[class*="wp-image-"], a.td-sml-link-to-image > img',
			    'general_selectors' => '.td-animation-stack .entry-thumb, .post .entry-thumb, .post img[class*="wp-image-"], a.td-sml-link-to-image > img',
		    ),
	    );


        /**
         * the headers
         */
        td_api_header_style::add('1',
            array(
                'text' => 'Default',
                'file' => td_global::$get_template_directory . '/parts/header/header-style-1.php',
                'img' => td_global::$get_template_directory_uri . '/images/panel/menu/icon-menu-1.png'
            )
        );


        /**
         * single template list
         */
        td_api_single_template::add('single_template',
            array(
                'file' => td_global::$get_template_directory . '/single.php',
                'text' => 'Single template',
                'img' => td_global::$get_template_directory_uri . '/images/panel/single_templates/single_template_0.png',
                'show_featured_image_on_all_pages' => false,
                'bg_disable_background' => false,          // disable the featured image
                'bg_box_layout_config' => 'auto',                // auto | td-boxed-layout | td-full-layout
                'bg_use_featured_image_as_background' => false,   // uses the featured image as a background
                'exclude_ad_content_top' => false,
            )
        );


        /**
         * category templates
         */
        td_api_category_template::add('td_category_template_1',
            array (
                'file' => td_global::$get_template_directory . '/includes/category_templates/td_category_template_1.php',
                'img' => td_global::$get_template_directory_uri . '/images/panel/category_templates/icon-category-1.png',
                'text' => 'Style 1',
                'group' => '' // '' - main theme, 'mob' - mobile theme, 'woo' - woo theme
            )
        );


        /**
         * category top posts styles
         */
        td_api_category_top_posts_style::add('td_category_top_posts_style_1',
            array (
                'file' => td_global::$get_template_directory . '/includes/category_top_posts_styles/td_category_top_posts_style_1.php',
                'posts_shown_in_the_loop' => 5,
                'img' => td_global::$get_template_directory_uri . '/images/panel/category_templates/icon-category-top-1.png',
                'text' => 'Grid 1',
                'td_block_name' => 'td_block_big_grid',
                'group' => '' // '' - main theme, 'mob' - mobile theme, 'woo' - woo theme
            )
        );


        /**
         * the td_api_footer
         */
        td_api_footer_template::add('td_footer_template_1',
            array(
                'img' => td_global::$get_template_directory_uri . '/images/panel/footer_templates/icon-footer-1.png',
                'file' => td_global::$get_template_directory . '/parts/footer/td_footer_template_1.php',
                'text' => 'Default'
            )
        );


        /**
         * the td_api_sub_footer
         */
        td_api_sub_footer_template::add('td_sub_footer_template_1',
            array(
                'img' => td_global::$get_template_directory_uri . '/images/panel/sub_footer_templates/icon-sub-footer-1.png',
                'file' => td_global::$get_template_directory . '/parts/footer/td_sub_footer_template_1.php',
                'text' => 'Default'

            )
        );


        /**
         * modules list
         */
        td_api_module::add('td_module_1',
            array(
                'file' => td_global::$get_template_directory . '/includes/modules/td_module_1.php',
                'text' => 'Module 1',
                'img' => td_global::$get_template_directory_uri . '/assets/images/panel/modules/td_module_1.png',
                'used_on_blocks' => array('td_block_3'),
                'excerpt_title' => 12,
                'excerpt_content' => '',
                'enabled_on_more_articles_box' => true,
                'enabled_on_loops' => true,
                'uses_columns' => true,
                'category_label' => true,
                'class' => 'td_module_wrap td-animation-stack',     // custom css module class
                'group' => '', // '' - main theme, 'mob' - mobile theme, 'woo' - woo theme
            )
        );
        td_api_module::add('td_module_15',
            array(
                'file' => td_global::$get_template_directory . '/includes/modules/td_module_15.php',
                'text' => 'Module 15',
                'img' => td_global::$get_template_directory_uri . '/assets/images/panel/modules/td_module_15.png',
                'used_on_blocks' => '',
                'excerpt_title' => 30,
                'excerpt_content' => '',
                'enabled_on_more_articles_box' => false,
                'enabled_on_loops' => true,
                'uses_columns' => false,                      // if the module uses columns on the page template + loop
                'category_label' => true,
                'class' => 'td-animation-stack',     // custom css module class
                'group' => '', // '' - main theme, 'mob' - mobile theme, 'woo' - woo theme
            )
        );
        td_api_module::add('td_module_mx2',
            array(
                'file' => td_global::$get_template_directory . '/includes/modules/td_module_mx2.php',
                'text' => 'Module MX2',
                'img' => '',
                'used_on_blocks' => array('td_block_15'),
                'excerpt_title' => 25,
                'excerpt_content' => '',
                'enabled_on_more_articles_box' => false,
                'enabled_on_loops' => false,
                'uses_columns' => false,                      // if the module uses columns on the page template + loop
                'category_label' => true,
                'class' => 'td_module_wrap td-animation-stack',     // custom css module class
                'group' => '', // '' - main theme, 'mob' - mobile theme, 'woo' - woo theme
            )
        );


        /**
         * block templates
         */
        td_api_block_template::add('td_block_template_1',
            array (
                'text' => 'Block Header 1 - Default',
                'img' => td_global::$get_template_directory_uri . '/images/panel/block_templates/icon-block-header-1.png',
                'file' => td_global::$get_template_directory . '/includes/block_templates/td_block_template_1.php',
                'params' => array(
                    // title settings
                    array(
                        "type" => "colorpicker",
                        "holder" => "div",
                        "class" => "",
                        "heading" => 'Title background color:',
                        "param_name" => "header_color",
                        "value" => '',
                        "description" => 'Optional - Choose a custom background color for this header',
                        'td_type' => 'block_template',
                    ),
                    array(
                        "type" => "colorpicker",
                        "holder" => "div",
                        "class" => "",
                        "heading" => 'Title text color:',
                        "param_name" => "header_text_color",
                        "value" => '',
                        "description" => 'Optional - Choose a custom title text color for this header',
                        'td_type' => 'block_template',
                    )
                )//end generic array
            )
        );


	    /**
         * the tiny mce styles
         */
        td_api_tinymce_formats::add('td_text_padding', array(
            'title' => 'Text padding'
        ));
            td_api_tinymce_formats::add('td_text_padding_0', array(
                'parent_id' => 'td_text_padding',
                'title' => 'text ⇠',
                'block' => 'div',
                'classes' => 'td-paragraph-padding-0',
                'wrapper' => true,
            ));
            td_api_tinymce_formats::add('td_text_padding_4', array(
                'parent_id' => 'td_text_padding',
                'title' => '⇢ text',
                'block' => 'div',
                'classes' => 'td-paragraph-padding-4',
                'wrapper' => true,
            ));
            td_api_tinymce_formats::add('td_text_padding_1', array(
                'parent_id' => 'td_text_padding',
                'title' => '⇢ text ⇠',
                'block' => 'div',
                'classes' => 'td-paragraph-padding-1',
                'wrapper' => true,
            ));
            td_api_tinymce_formats::add('td_text_padding_3', array(
                'parent_id' => 'td_text_padding',
                'title' => '⇢ text ⇠⇠',
                'block' => 'div',
                'classes' => 'td-paragraph-padding-3',
                'wrapper' => true,
            ));
            td_api_tinymce_formats::add('td_text_padding_6', array(
                'parent_id' => 'td_text_padding',
                'title' => '⇢⇢ text ⇠',
                'block' => 'div',
                'classes' => 'td-paragraph-padding-6',
                'wrapper' => true,
            ));
            td_api_tinymce_formats::add('td_text_padding_2', array(
                'parent_id' => 'td_text_padding',
                'title' => '⇢⇢ text ⇠⇠',
                'block' => 'div',
                'classes' => 'td-paragraph-padding-2',
                'wrapper' => true,
            ));
            td_api_tinymce_formats::add('td_text_padding_5', array(
                'parent_id' => 'td_text_padding',
                'title' => '⇢⇢⇢ text ⇠⇠⇠',
                'block' => 'div',
                'classes' => 'td-paragraph-padding-5',
                'wrapper' => true,
            ));
        td_api_tinymce_formats::add('arrow_list', array(
	        'title' => 'Arrow list',
	        'selector' => 'ul',
	        'classes' => 'td-arrow-list'
        ));
        td_api_tinymce_formats::add('td_blockquote',
	        array(
		        'title' => 'Quotes'
	        ));
	        td_api_tinymce_formats::add('td_blockquote_1',
		        array(
			        'parent_id' => 'td_blockquote',
			        'title' => 'Quote left',
			        'block' => 'blockquote',
			        'classes' => 'td_quote td_quote_left',
			        'wrapper' => true,
		        ));
	        td_api_tinymce_formats::add('td_blockquote_2',
		        array(
			        'parent_id' => 'td_blockquote',
			        'title' => 'Quote right',
			        'block' => 'blockquote',
			        'classes' => 'td_quote td_quote_right',
			        'wrapper' => true,
		        ));
	        td_api_tinymce_formats::add('td_blockquote_3',
		        array(
			        'parent_id' => 'td_blockquote',
			        'title' => 'Quote box center',
			        'block' => 'blockquote',
			        'classes' => 'td_quote_box td_box_center',
			        'wrapper' => true,
		        ));
	        td_api_tinymce_formats::add('td_blockquote_4',
		        array(
			        'parent_id' => 'td_blockquote',
			        'title' => 'Quote box left',
			        'block' => 'blockquote',
			        'classes' => 'td_quote_box td_box_left',
			        'wrapper' => true,
		        ));
	        td_api_tinymce_formats::add('td_blockquote_5',
		        array(
			        'parent_id' => 'td_blockquote',
			        'title' => 'Quote box right',
			        'block' => 'blockquote',
			        'classes' => 'td_quote_box td_box_right',
			        'wrapper' => true,
		        ));
	        td_api_tinymce_formats::add('td_blockquote_6',
		        array(
			        'parent_id' => 'td_blockquote',
			        'title' => 'Pull quote center',
			        'block' => 'blockquote',
			        'classes' => 'td_pull_quote td_pull_center',
			        'wrapper' => true,
		        ));
	        td_api_tinymce_formats::add('td_blockquote_7',
		        array(
			        'parent_id' => 'td_blockquote',
			        'title' => 'Pull quote left',
			        'block' => 'blockquote',
			        'classes' => 'td_pull_quote td_pull_left',
			        'wrapper' => true,
		        ));
	        td_api_tinymce_formats::add('td_blockquote_8',
		        array(
			        'parent_id' => 'td_blockquote',
			        'title' => 'Pull quote right',
			        'block' => 'blockquote',
			        'classes' => 'td_pull_quote td_pull_right',
			        'wrapper' => true,
		        ));

        // dropcap
        td_api_tinymce_formats::add('td_dropcap',
	        array(
		        'title' => 'Dropcaps'
	        ));
	        td_api_tinymce_formats::add('td_dropcap_0',
		        array(
			        'parent_id' => 'td_dropcap',
			        'title' => 'Box',
			        'classes' => 'dropcap',
			        'inline' => 'span'
		        ));
	        td_api_tinymce_formats::add('td_dropcap_1',
		        array(
			        'parent_id' => 'td_dropcap',
			        'title' => 'Circle',
			        'classes' => 'dropcap dropcap1',
			        'inline' => 'span'
		        ));
	        td_api_tinymce_formats::add('td_dropcap_2',
		        array(
			        'parent_id' => 'td_dropcap',
			        'title' => 'Regular',
			        'classes' => 'dropcap dropcap2',
			        'inline' => 'span'
		        ));
	        td_api_tinymce_formats::add('td_dropcap_3',
		        array(
			        'parent_id' => 'td_dropcap',
			        'title' => 'Bold',
			        'classes' => 'dropcap dropcap3',
			        'inline' => 'span'
		        ));

        // Custom buttons in post Formats
        td_api_tinymce_formats::add('td_btn',
            array(
                'title' => 'Button'
            ));
        //Default button
        td_api_tinymce_formats::add('td_default_btn',
            array(
                'parent_id' => 'td_btn',
                'title' => 'Default',
                'classes' => 'td_default_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_default_btn_sm',
            array(
                'parent_id' => 'td_default_btn',
                'title' => 'Small',
                'classes' => 'td_btn td_btn_sm td_default_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_default_btn_md',
            array(
                'parent_id' => 'td_default_btn',
                'title' => 'Normal',
                'classes' => 'td_btn td_btn_md td_default_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_default_btn_lg',
            array(
                'parent_id' => 'td_default_btn',
                'title' => 'Large',
                'classes' => 'td_btn td_btn_lg td_default_btn',
                'inline' => 'span'
            ));
        //Square button
        td_api_tinymce_formats::add('td_square_btn',
            array(
                'parent_id' => 'td_btn',
                'title' => 'Square',
                'classes' => ' td_square_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_square_btn_sm',
            array(
                'parent_id' => 'td_square_btn',
                'title' => 'Small',
                'classes' => 'td_btn  td_btn_sm td_square_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_square_btn_md',
            array(
                'parent_id' => 'td_square_btn',
                'title' => 'Normal',
                'classes' => 'td_btn td_btn_md td_square_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_square_btn_lg',
            array(
                'parent_id' => 'td_square_btn',
                'title' => 'Large',
                'classes' => 'td_btn td_btn_lg td_square_btn',
                'inline' => 'span'
            ));
        //Outlined button
        td_api_tinymce_formats::add('td_outlined_btn',
            array(
                'parent_id' => 'td_btn',
                'title' => 'Outlined',
                'classes' => 'td_outlined_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_outlined_btn_sm',
            array(
                'parent_id' => 'td_outlined_btn',
                'title' => 'Small',
                'classes' => 'td_btn td_btn_sm td_outlined_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_outlined_btn_md',
            array(
                'parent_id' => 'td_outlined_btn',
                'title' => 'Normal',
                'classes' => 'td_btn td_btn_md td_outlined_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_outlined_btn_lg',
            array(
                'parent_id' => 'td_outlined_btn',
                'title' => 'Large',
                'classes' => 'td_btn td_btn_lg td_outlined_btn',
                'inline' => 'span'
            ));
        //Shadow button
        td_api_tinymce_formats::add('td_shadow_btn',
            array(
                'parent_id' => 'td_btn',
                'title' => 'Shadow',
                'classes' => 'td_shadow_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_shadow_btn_sm',
            array(
                'parent_id' => 'td_shadow_btn',
                'title' => 'Small',
                'classes' => 'td_btn td_btn_sm td_shadow_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_shadow_btn_md',
            array(
                'parent_id' => 'td_shadow_btn',
                'title' => 'Normal',
                'classes' => 'td_btn td_btn_md td_shadow_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_shadow_btn_lg',
            array(
                'parent_id' => 'td_shadow_btn',
                'title' => 'Large',
                'classes' => 'td_btn td_btn_lg td_shadow_btn',
                'inline' => 'span'
            ));
        //3D button
        td_api_tinymce_formats::add('td_3D_btn',
            array(
                'parent_id' => 'td_btn',
                'title' => '3D',
                'classes' => 'td_3D_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_3D_btn_sm',
            array(
                'parent_id' => 'td_3D_btn',
                'title' => 'Small',
                'classes' => 'td_btn td_btn_sm td_3D_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_3D_btn_md',
            array(
                'parent_id' => 'td_3D_btn',
                'title' => 'Normal',
                'classes' => 'td_btn td_btn_md td_3D_btn',
                'inline' => 'span'
            ));
        td_api_tinymce_formats::add('td_3D_btn_lg',
            array(
                'parent_id' => 'td_3D_btn',
                'title' => 'Large',
                'classes' => 'td_btn td_btn_lg td_3D_btn',
                'inline' => 'span'
            ));


        /**
         * the tiny mce image style list
         */
        td_global::$tiny_mce_image_style_list = array(
            'td_full_width' => array(
                'text' => 'Full width',
                'class' => 'td-post-image-full'
            ),
            'td_full_width_and_grid' => array(
                'text' => 'Full width and grid border',
                'class' => 'td-post-image-full-and-grid'
            ),
            'td_left' => array(
                'text' => 'Left ( Over grid )',
                'class' => 'td-post-image-left'
            ),
            'td_right' => array(
                'text' => 'Right ( Over grid )',
                'class' => 'td-post-image-right'
            )
        );


        /**
         * set the custom css fields for the panel @see td_panel_custom_css.php
         * and also for the wp_footer hook @see td_bottom_code()
         */
        td_global::$theme_panel_custom_css_fields_list = array(
            'tds_responsive_css_desktop' => array(
                'text' => 'DESKTOP',
                'description' => '1024px +',
                'media_query' => '@media (min-width: 1200px)',
                'img' => td_global::$get_template_directory_uri . '/includes/wp_booster/wp-admin/images/panel/resp-desktop.png'
            ),
            'tds_responsive_css_ipad_portrait' => array(
                'text' => 'IPAD PORTRAIT',
                'description' => '768 - 1023px',
                'media_query' => '@media (min-width: 768px) and (max-width: 1018px)',
                'img' => td_global::$get_template_directory_uri . '/includes/wp_booster/wp-admin/images/panel/resp-ipadv.png'
            ),
            'tds_responsive_css_phone' => array(
                'text' => 'PHONES',
                'description' => '0 - 767px',
                'media_query' => '@media (max-width: 767px)',
                'img' => td_global::$get_template_directory_uri . '/includes/wp_booster/wp-admin/images/panel/resp-phone.png'
            )
        );


	    // @todo Change it to use just one option for viewport settings!
	    td_global::$viewport_settings = array(
            'all' => td_global::$theme_panel_custom_css_fields_list['tds_responsive_css_desktop'],
            'portrait' => td_global::$theme_panel_custom_css_fields_list['tds_responsive_css_ipad_portrait'],
            'phone' => td_global::$theme_panel_custom_css_fields_list['tds_responsive_css_phone'],
        );


        /**
         * the default fonts used by the theme. For a list of fonts ids @see td_fonts::$font_names_google_list
         */
        td_global::$default_google_fonts_list = array (
            '438' => array(
                '300',
                '400',
                '600',
                '700'
            ),
            '522' => array(
                '300',
                '300italic',
                '400',
                '400italic',
                '700',
                '700italic'
            ),
        );


	    /**
	     * the stacks are stored in /includes/stacks
	     * stack_filename (without .txt) => stack_name
	     * @var array
	     */
	    td_global::$demo_list = array (
		    'default' => array(
			    'text' => 'Default',
			    'folder' => td_global::$get_template_directory . '/includes/demos/default/',
			    'img' => td_global::$get_template_directory_uri . '/includes/demos/default/screenshot.png',
			    'demo_url' => 'http://demo.tagdiv.com/newsmag/',
			    'td_css_generator_demo' => false,                // must have a td_css_generator_demo.php in demo's folder
			    'uses_custom_style_css' => false                // load a custom demo_style.less - must also be added to td_less_style.css.php
		    ),
            'magazine' => array(
                'text' => 'Magazine',
                'folder' => td_global::$get_template_directory . '/includes/demos/magazine/',
                'img' => td_global::$get_template_directory_uri . '/includes/demos/magazine/screenshot.png',
                'demo_url' => 'http://demo.tagdiv.com/newsmag_magazine/',
                'td_css_generator_demo' => true,                // must have a td_css_generator_demo.php in demo's folder
                'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
            ),
            'food' => array(
                'text' => 'Food',
                'folder' => td_global::$get_template_directory . '/includes/demos/food/',
                'img' => td_global::$get_template_directory_uri . '/includes/demos/food/screenshot.png',
                'demo_url' => 'http://demo.tagdiv.com/newsmag_food/',
                'td_css_generator_demo' => true,                // must have a td_css_generator_demo.php in demo's folder
                'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
            ),
            'scandal' => array(
                'text' => 'Scandal',
                'folder' => td_global::$get_template_directory . '/includes/demos/scandal/',
                'img' => td_global::$get_template_directory_uri . '/includes/demos/scandal/screenshot.png',
                'demo_url' => 'http://demo.tagdiv.com/newsmag_scandal/',
                'td_css_generator_demo' => true,                // must have a td_css_generator_demo.php in demo's folder
                'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
            ),
            'cars' => array(
                'text' => 'Cars',
                'folder' => td_global::$get_template_directory . '/includes/demos/cars/',
                'img' => td_global::$get_template_directory_uri . '/includes/demos/cars/screenshot.png',
                'demo_url' => 'http://demo.tagdiv.com/newsmag_cars/',
                'td_css_generator_demo' => true,                // must have a td_css_generator_demo.php in demo's folder
                'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
            ),
            'voice' => array(
                'text' => 'Clear Voice',
                'folder' => td_global::$get_template_directory . '/includes/demos/voice/',
                'img' => td_global::$get_template_directory_uri . '/includes/demos/voice/screenshot.png',
                'demo_url' => 'http://demo.tagdiv.com/newsmag_voice/',
                'td_css_generator_demo' => true,                // must have a td_css_generator_demo.php in demo's folder
                'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
            ),
            'sound_square' => array(
                'text' => 'Sound Square',
                'folder' => td_global::$get_template_directory . '/includes/demos/sound_square/',
                'img' => td_global::$get_template_directory_uri . '/includes/demos/sound_square/screenshot.png',
                'demo_url' => 'http://demo.tagdiv.com/newsmag_sound_square/',
                'td_css_generator_demo' => true,                // must have a td_css_generator_demo.php in demo's folder
                'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
            ),
            'animals' => array(
                'text' => 'Animals',
                'folder' => td_global::$get_template_directory . '/includes/demos/animals/',
                'img' => td_global::$get_template_directory_uri . '/includes/demos/animals/screenshot.png',
                'demo_url' => 'http://demo.tagdiv.com/newsmag_animals/',
                'td_css_generator_demo' => true,                // must have a td_css_generator_demo.php in demo's folder
                'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
            ),
            'video' => array(
                'text' => 'Video',
                'folder' => td_global::$get_template_directory . '/includes/demos/video/',
                'img' => td_global::$get_template_directory_uri . '/includes/demos/video/screenshot.png',
                'demo_url' => 'http://demo.tagdiv.com/newsmag_video/',
                'td_css_generator_demo' => false,                // must have a td_css_generator_demo.php in demo's folder
                'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
            ),
            'tech' => array(
                'text' => 'Tech',
                'folder' => td_global::$get_template_directory . '/includes/demos/tech/',
                'img' => td_global::$get_template_directory_uri . '/includes/demos/tech/screenshot.png',
                'demo_url' => 'http://demo.tagdiv.com/newsmag_tech/',
                'td_css_generator_demo' => false,                // must have a td_css_generator_demo.php in demo's folder
                'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
            ),
            'travel' => array(
                'text' => 'Travel',
                'folder' => td_global::$get_template_directory . '/includes/demos/travel/',
                'img' => td_global::$get_template_directory_uri . '/includes/demos/travel/screenshot.png',
                'demo_url' => 'http://demo.tagdiv.com/newsmag_travel/',
                'td_css_generator_demo' => true,                // must have a td_css_generator_demo.php in demo's folder
                'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
            ),
		    'sport' => array(
			    'text' => 'Sport',
			    'folder' => td_global::$get_template_directory . '/includes/demos/sport/',
			    'img' => td_global::$get_template_directory_uri . '/includes/demos/sport/screenshot.png',
			    'demo_url' => 'http://demo.tagdiv.com/newsmag_sport/',
			    'td_css_generator_demo' => false,                // must have a td_css_generator_demo.php in demo's folder
			    'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
		    ),
		    'fashion' => array(
			    'text' => 'Fashion',
			    'folder' => td_global::$get_template_directory . '/includes/demos/fashion/',
			    'img' => td_global::$get_template_directory_uri . '/includes/demos/fashion/screenshot.png',
			    'demo_url' => 'http://demo.tagdiv.com/newsmag_fashion/',
			    'td_css_generator_demo' => false,                // must have a td_css_generator_demo.php in demo's folder
			    'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
		    ),
		    'blog' => array(
			    'text' => 'Classic Blog',
			    'folder' => td_global::$get_template_directory . '/includes/demos/blog/',
			    'img' => td_global::$get_template_directory_uri . '/includes/demos/blog/screenshot.png',
			    'demo_url' => 'http://demo.tagdiv.com/newsmag_classic_blog/',
			    'td_css_generator_demo' => true,                // must have a td_css_generator_demo.php in demo's folder
			    'uses_custom_style_css' => true                // load a custom demo_style.less - must also be added to td_less_style.css.php
		    )
	    );

	    /**
	     * theme plugins
	     */
	    td_global::$theme_plugins_for_info_list = array (
		    array(
			    'name' => 'Revolution Slider',
			    'img' => td_global::$get_template_directory_uri . '/includes/wp_booster/wp-admin/images/plugins/rev-slider.png',
			    'text' => 'Build amazing slide presentations for your website with ease<br><a href="http://forum.tagdiv.com/how-to-install-revolution-slider-v5/" target="_blank">How to install v5</a>',
			    'required_label' => 'optional', //the text for required/recommended label - used also as a class for label bg color
			    'slug' => 'revslider'
		    ),
		    array(
			    'name' => 'Visual Composer',
			    'img' => td_global::$get_template_directory_uri . '/includes/wp_booster/wp-admin/images/plugins/visual-composer.png',
			    'text' => 'Customize your pages and posts with this popular page builder<br><a href="http://forum.tagdiv.com/how-to-use-visual-composer/" target="_blank">Read more</a>',
			    'required_label' => 'optional', //the text for required/recommended label - used also as a class for label bg color
			    'slug' => 'js_composer'
		    )
	    );
	    td_global::$theme_plugins_list = array(
		    array(
			    'name' => 'tagDiv Composer', // The plugin name
			    'slug' => 'td-composer', // The plugin slug (typically the folder name)
			    'source' => td_global::$get_template_directory_uri . '/includes/plugins/td-composer.zip', // The plugin source
			    'required' => true, // If false, the plugin is only 'recommended' instead of required
			    'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented
			    'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch
			    'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins
			    'external_url' => '', // If set, overrides default API URL and points to an external URL
			    'img' => td_global::$get_template_directory_uri . '/includes/wp_booster/wp-admin/images/plugins/td-composer.png',
			    'text' => 'Create beautiful pages with this custom frontend drag and drop builder<br><a href="http://http://forum.tagdiv.com/tagdiv-composer-tutorial/" target="_blank">Read more</a>',
			    'required_label' => 'required', //the text for required/recommended label - used also as a class for label bg color
			    'td_activate' => true, // custom field used to activate the plugin
			    'td_install' => true, // custom field used to install the plugin
			    'td_class' => 'tdc_config', // class used to recognize the plugin is activated
			    'td_install_in_welcome' => true, // custom field used to install/update/activate the plugin from theme welcome panel
		    ),
		    array(
			    'name' => 'tagDiv Social Counter', // The plugin name
			    'slug' => 'td-social-counter', // The plugin slug (typically the folder name)
			    'source' => td_global::$get_template_directory_uri . '/includes/plugins/td-social-counter.zip', // The plugin source
			    'required' => true, // If false, the plugin is only 'recommended' instead of required
			    'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented
			    'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch
			    'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins
			    'external_url' => '', // If set, overrides default API URL and points to an external URL
			    'img' => td_global::$get_template_directory_uri . '/includes/wp_booster/wp-admin/images/plugins/social.png',
			    'text' => 'Display your activity on social networks with style using this cool feature<br><a href="http://forum.tagdiv.com/tagdiv-social-counter-tutorial/" target="_blank">Read more</a>',
			    'required_label' => 'required', //the text for required/recommended label - used also as a class for label bg color
			    'td_activate' => true, // custom field used to activate the plugin
			    'td_install' => true, // custom field used to install the plugin
			    'td_class' => 'td_social_counter_plugin', // class used to recognize the plugin is activated
			    'td_install_in_welcome' => true, // custom field used to install/update/activate the plugin from theme welcome panel
		    ),
		    array(
			    'name' => 'tagDiv Newsletter', // The plugin name
			    'slug' => 'td-newsletter', // The plugin slug (typically the folder name)
			    'source' => td_global::$get_template_directory_uri . '/includes/plugins/td-newsletter.zip?uid=' . uniqid(), // The plugin source
			    'required' => false, // If false, the plugin is only 'recommended' instead of required
			    'version' => '1.0.0', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented
			    'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch
			    'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins
			    'external_url' => '', // If set, overrides default API URL and points to an external URL
			    'img' => td_global::$get_template_directory_uri . '/includes/wp_booster/wp-admin/images/plugins/tagdiv-newsletter.png',
			    'text' => 'tagDiv\'s Newsletter plugin, beautifully designed with over 8 styles',
			    'required_label' => 'optional', //the text for required/recommended label - used also as a class for label bg color
			    'td_activate' => false, // custom field used to activate the plugin
			    'td_install' => false, // custom field used to install the plugin
			    'td_class' => 'td_newsletter_version_check', // class used to recognize the plugin is activated
			    'td_install_in_welcome' => false, // custom field used to install/update/activate the plugin from theme welcome panel
		    ),
		    array(
			    'name' => 'tagDiv Mobile Theme', // The plugin name
			    'slug' => 'td-mobile-plugin', // The plugin slug (typically the folder name)
			    'source' => td_global::$get_template_directory_uri . '/includes/plugins/td-mobile-plugin.zip?uid=' . uniqid(), // The plugin source
			    'required' => false, // If false, the plugin is only 'recommended' instead of required
			    'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented
			    'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch
			    'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins
			    'external_url' => '', // If set, overrides default API URL and points to an external URL
			    'img' => td_global::$get_template_directory_uri . '/includes/wp_booster/wp-admin/images/plugins/mobile.png',
			    'text' => 'Make your website lighter and faster on all mobile devices<br><a href="http://forum.tagdiv.com/the-mobile-theme/" target="_blank">Read more</a>',
			    'required_label' => 'optional', //the text for required/recommended label - used also as a class for label bg color
			    'td_activate' => false, // custom field used to activate the plugin
			    'td_install' => false, // custom field used to install the plugin
			    'td_class' => 'td_mobile_theme', // class used to recognize the plugin is activated
			    'td_install_in_welcome' => false, // custom field used to install/update/activate the plugin from theme welcome panel
		    ),
		    array(
			    'name' => 'Official AMP for WP', // The plugin name
			    'slug' => 'amp', // The plugin slug (typically the folder name)
			    'required' => false, // If false, the plugin is only 'recommended' instead of required
			    'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented
			    'img' => td_global::$get_template_directory_uri . '/includes/wp_booster/wp-admin/images/plugins/tagdiv-amp.png',
			    'text' => 'Mobile Theme requires the AMP plugin to give your site the best results<br><a href="https://tagdiv.com/amp-newspaper-theme/" target="_blank">Read more</a>',
			    'required_label' => 'optional', //the text for required/recommended label - used also as a class for label bg color
			    'td_class' => 'AMP_Autoloader', // class used to recognize the plugin is activated
			    'td_install_in_welcome' => false, // custom field used to install/update/activate the plugin from theme welcome panel
		    )
	    );

        /*
         * it doesn't require the tagDiv Composer plugin
         */
        td_api_features::set('require_vc', false);
        //td_api_features::set('require_td_composer', true);

	    // disable activation/demos/panel/updates check if just theme without composer..
	    if ( ! defined('TD_COMPOSER' ) ) {

		    add_action( 'admin_enqueue_scripts', function() {
			    $custom_css = "
					#adminmenu a[href*=\"td_cake_panel\"],
	                #adminmenu a[href*=\"td_theme_demos\"],
	                #adminmenu a[href*=\"td_theme_panel\"],
	                .nav-tab-wrapper a[href*=\"td_cake_panel\"],
	                .nav-tab-wrapper a[href*=\"td_theme_demos\"],
	                .nav-tab-wrapper a[href*=\"td_theme_panel\"] {
	                    display: none
	                }";
			    wp_add_inline_style( 'td-wp-admin-td-panel-2', $custom_css );
		    }, 11);
	    }

        if ( is_admin() ) {

            /**
             * generate the theme panel
             */
            td_global::$all_theme_panels_list =  array (
                'theme_panel' => array (
                    'title' => TD_THEME_NAME . ' - Theme panel',
                    'subtitle' => 'version: ' . TD_THEME_VERSION,
                    'panels' => array (
                        'td-panel-header' => array(
                            'text' => 'HEADER',
                            'ico_class' => 'td-ico-header',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_header.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-footer' => array(
                            'text' => 'FOOTER',
                            'ico_class' => 'td-ico-footer',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_footer.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-ads' => array(
                            'text' => 'ADS',
                            'ico_class' => 'td-ico-ads',
                            'file' => td_global::$get_template_directory . '/includes/panel/views/td_panel_ads.php',
                            'type' => 'in_theme'
                        ),

                        /*  ----------------------------------------------------------------------------
                            layout settings
                         */
                        'td-panel-separator-1' => array(   // LAYOUT SETTINGS Separator
                            'text' => 'LAYOUT SETTINGS',
                            'type' => 'separator'
                        ),
                        'td-panel-template-settings' => array(
                            'text' => 'TEMPLATE SETTINGS',
                            'ico_class' => 'td-ico-template',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_template_settings.php',
                            'type' => 'in_theme'
                        ),

                        'td-panel-categories' => array(
                            'text' => 'CATEGORIES',
                            'ico_class' => 'td-ico-categories',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_categories.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-post-settings' => array(
                            'text' => 'POST SETTINGS',
                            'ico_class' => 'td-ico-post',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_post_settings.php',
                            'type' => 'in_theme'
                        ),


                        /*  ----------------------------------------------------------------------------
                            misc
                         */
                        'td-panel-separator-2' => array( // MISC Separator
                            'text' => 'MISC',
                            'type' => 'separator'
                        ),
                        'td-panel-block-style' => array(
                            'text' => 'BLOCK SETTINGS',
                            'ico_class' => 'td-ico-block',
                            'file' => td_global::$get_template_directory . '/includes/panel/views/td_panel_block_settings.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-background' => array(
                            'text' => 'BACKGROUND',
                            'ico_class' => 'td-ico-background',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_background.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-excerpts' => array(
                            'text' => 'EXCERPTS',
                            'ico_class' => 'td-ico-excerpts',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_excerpts.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-translates' => array(
                            'text' => 'TRANSLATIONS',
                            'ico_class' => 'td-ico-translation',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_translations.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-theme-colors' => array(
                            'text' => 'THEME COLORS',
                            'ico_class' => 'td-ico-color',
                            'file' => td_global::$get_template_directory . '/includes/panel/views/td_panel_theme_colors.php',
                            'type' => 'in_theme'
                        ),

                        'td-panel-theme-fonts' => array(
                            'text' => 'THEME FONTS',
                            'ico_class' => 'td-ico-typography',
                            'file' => td_global::$get_template_directory . '/includes/panel/views/td_panel_theme_fonts.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-custom-code' => array(
                            'text' => 'CUSTOM CODE',
                            'ico_class' => 'td-ico-code',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_custom_code.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-analytics' => array(
                            'text' => 'ANALYTICS/JS CODES',
                            'ico_class' => 'td-ico-analytics',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_analytics.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-social-networks' => array(
                            'text' => 'SOCIAL NETWORKS',
                            'ico_class' => 'td-ico-social',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_social_networks.php',
                            'type' => 'in_theme'
                        ),
                        'td-panel-cpt-taxonomy' => array(
                            'text' => 'CPT &amp; TAXONOMY',
                            'ico_class' => 'td-ico-cpt',
                            'file' => td_global::$get_template_directory . '/includes/wp_booster/wp-admin/panel/views/td_panel_cpt_taxonomy.php',
                            'type' => 'in_theme'
                        ),
                        'td-link-1' => array( // MISC Separator
                            'text' => 'Import / export',
                            'url' => '?page=td_theme_panel&td_page=td_view_import_export_settings',
                            'type' => 'link'
                        )
                    )
                )
            );

	        /*
	         * the list with custom texts of the theme. admin texts
	         */
	        td_api_text::set('text_featured_video', '
	                <div class="td-wpa-info">Paste a video link from Youtube, Vimeo, Dailymotion or Facebook, it will be embedded in the post and the thumb used as the featured image of this post. <br/>You need to choose <strong>Video Format</strong> from above to use Featured Video.</div>
	                <div class="td-wpa-info"><strong>Notice:</strong> Use only with those post templates:
	                    <ul>
	                        <li>Post style default</li>
	                        <li>Post style 1</li>
	                        <li>Post style 2</li>
	                        <li>Post style 3</li>
	                        <li>Post style 8</li>
			            </ul>
			            <ul>
	                        <li>Find more about this <a href="http://forum.tagdiv.com/newsmag-featured-image-or-video/" target="_blank">feature</a></li>
	                    </ul>
	                </div>'
	        );
	        td_api_text::set('text_header_logo',
		        'Text logo for header Style 10:'
	        );
	        td_api_text::set('text_header_logo_description',
		        'The text logo is used only by Style 10 - full menu + text logo. The other header styles use only images for logos'
	        );
	        td_api_text::set('text_header_logo_mobile',
		        'Style 4, Style 5 or Style 9'
	        );
	        td_api_text::set('text_header_logo_mobile_image',
		        '230 x 90px'
	        );
	        td_api_text::set('text_header_logo_mobile_image_retina',
		        '460 x 180px'
	        );
	        td_api_text::set('text_smart_sidebar_widget_support', '
                <p>From here you can enable and disable the smart sidebar on all the templates. The smart sidebar is an affix (sticky) sidebar that has auto resize and it scrolls with the content. The smart sidebar reverts back to a normal sidebar on iOS (iPad) and on mobile devices. The following widgets are not supported in the smart sidebar:</p>
                <ul>
                    <li>[tagDiv] Block 14</li>
                    <li>[tagDiv] Block 15</li>
                    <li>[tagDiv] Slide</li>
                </ul>
            ');
            td_api_text::set('welcome_fast_start', 'The theme will try to install <strong>tagDiv Composer</strong> and <strong>tagDiv Social Counter</strong> plugins automatically. But you can also manually manage the plugins from our <a href="admin.php?page=td_theme_plugins">plugins panel</a>');
            td_api_text::set('welcome_support_forum', '
            <h2>Support forum</h2>
            <p>We offer outstanding support through our forum. To get support first you need to register (create an account) and open a thread in the ' . TD_THEME_NAME . ' Section.</p>
            <a class="button button-primary" href="http://forum.tagdiv.com/" target="_blank">Open forum</a>'
            );
            td_api_text::set('welcome_docs', '
            <h2>Docs and learning</h2>
            <p>Our online documentation will give you important information about the theme. This is a exceptional resource to start discovering the theme’s true potential.</p>
            <a class="button button-primary" href="http://forum.tagdiv.com/newsmag-documentation/" target="_blank">Open documentation</a>'
            );
            td_api_text::set('welcome_video_tutorials', '
            <h2>Video tutorials</h2>
            <p>We believe that the easiest way to learn is watching a video tutorial. We have a growing library of narrated video tutorials to help you do just that.</p>
            <a class="button button-primary" href="https://www.youtube.com/watch?v=TUdVeZ1pbuc&list=PL6CsDkMaejhpWFcFNOIDfdp5nIT0NbUbj" target="_blank">View tutorials</a>'
            );

            /**
             * the stacks are stored in /includes/stacks
             * stack_filename (without .txt) => stack_name
             * @var array
             */
            /**
            td_global::$stacks_list = array(
                'classic_blog' => 'Classic blog',
                'fashion' => 'Fashion',
                'sport' => 'Sport',
                'tech' => 'Tech',
                'video' => 'Video',
            );
            */

        } // end if is_admin




	    add_action('after_setup_theme', function() {
		   global $td_translation_map;

			$td_translation_map = array(
			    //top bar
			    'Tel:' => __('Tel:', 'newsmag'),
			    'Email:' => __('Email:', 'newsmag'),

			    //header search
			    'View all results' => __('View all results', 'newsmag'),
			    'No results' => __('No results', 'newsmag'),

			    'Home' => __('Home', 'newsmag'),

			    //mobile menu
			    'CLOSE' => __('CLOSE', 'newsmag'),

			    //title tag
			    'Page' => __('Page', 'newsmag'),


			    //blocks
			    'All' => __('All', 'newsmag'),
			    'By' => __('By', 'newsmag'),
			    'Load more' => __('Load more', 'newsmag'),
			    'Modified date:' => __('Modified date:', 'newsmag'),

			    //breadcrumbs
			    'View all posts in' => __('View all posts in', 'newsmag'),
			    'Tags' => __('Tags', 'newsmag'),

			    //article / page
			    'Previous article' => __('Previous article', 'newsmag'),
			    'Next article' => __('Next article', 'newsmag'),
			    'Authors' => __('Authors', 'newsmag'),
			    'Author' => __('Author', 'newsmag'),
			    'RELATED ARTICLES' => __('RELATED ARTICLES', 'newsmag'),   //on newsmag 4 it was: SIMILAR ARTICLES
			    'MORE FROM AUTHOR' => __('MORE FROM AUTHOR', 'newsmag'),
			    'VIA' => __('VIA', 'newsmag'),   //on newsmag4 it was lowercase
			    'SOURCE' => __('SOURCE', 'newsmag'), //on newsmag4 it was lowercase
			    'TAGS' => __('TAGS', 'newsmag'),
			    'Share' => __('Share', 'newsmag'),
			    'SHARE' => __('SHARE', 'newsmag'),
			    'Continue' => __('Continue', 'newsmag'),
			    'Read more' => __('Read more', 'newsmag'),
			    'views' => __('views', 'newsmag'),


			    //comments
			    'Name:' => __('Name:', 'newsmag'),
			    'Website:' => __('Website:', 'newsmag'),
			    'Comment:' => __('Comment:', 'newsmag'),
			    'LEAVE A REPLY' => __('LEAVE A REPLY', 'newsmag'),  //on newsmag4 it was lowercase
			    'Post Comment' => __('Post Comment', 'newsmag'),
			    'Cancel reply' => __('Cancel reply', 'newsmag'),
			    'Reply' => __('Reply', 'newsmag'),
			    'Log in to leave a comment' => __('Log in to leave a comment', 'newsmag'),
			    'NO COMMENTS' => __('NO COMMENTS', 'newsmag'),
			    '1 COMMENT' => __('1 COMMENT', 'newsmag'),
			    'COMMENTS' => __('COMMENTS', 'newsmag'),
			    'Your comment is awaiting moderation' => __('Your comment is awaiting moderation', 'newsmag'),
			    'Please enter your name here' => __('Please enter your name here', 'newsmag'),
			    'Please enter your email address here' => __('Please enter your email address here', 'newsmag'),
			    'You have entered an incorrect email address!' => __('You have entered an incorrect email address!', 'newsmag'),
			    'Please enter your comment!' => __('Please enter your comment!', 'newsmag'),
			    'Logged in as'                        => __('Logged in as', 'newsmag'),
			    'Log out?'                            => __('Log out?', 'newsmag'),
			    'Logged in as %s. Edit your profile.' => __('Logged in as %s. Edit your profile.', 'newsmag'),
			    'Edit' => __('Edit', 'newsmag'),


			    //review
			    'REVIEW OVERVIEW' => __('REVIEW OVERVIEW', 'newsmag'),  //on newsmag4 it was lowercase
			    'SUMMARY' => __('SUMMARY', 'newsmag'),  //on newsmag4 it was lowercase
			    'OVERALL SCORE' => __('OVERALL SCORE', 'newsmag'),

			    //404
			    'Ooops... Error 404' => __('Ooops... Error 404', 'newsmag'),
			    "Sorry, but the page you are looking for doesn_t exist." => __("Sorry, but the page you are looking for doesn't exist.", 'newsmag'),
			    'You can go to the' => __('You can go to the', 'newsmag'),
			    'HOMEPAGE' => __('HOMEPAGE', 'newsmag'),


			    'OUR LATEST POSTS' => __('OUR LATEST POSTS', 'newsmag'),

			    //author page title atribute
			    'Posts by' => __('Posts by', 'newsmag'),
			    'POSTS' => __('POSTS', 'newsmag'),


			    'Posts tagged with' => __('Posts tagged with', 'newsmag'),
			    'Tag' => __('Tag', 'newsmag'),

			    //archives
			    'Daily Archives:' => __('Daily Archives:', 'newsmag'),
			    'Monthly Archives:' => __('Monthly Archives:', 'newsmag'),
			    'Yearly Archives:' => __('Yearly Archives:', 'newsmag'),
			    'Archives' => __('Archives', 'newsmag'),


			    //homepage
			    'LATEST ARTICLES' => __('LATEST ARTICLES', 'newsmag'),

			    //search page
			    'search results' => __('search results', 'newsmag'),
			    'Search' => __('Search', 'newsmag'),
			    "If you_re not happy with the results, please do another search" => __("If you're not happy with the results, please do another search", 'newsmag'),

			    //footer widget
			    'Contact us' => __('Contact us', 'newsmag'),

			    //footer instagram
			    'Follow us on Instagram' => __('Follow us on Instagram', 'newsmag'),

			    //pagination
			    'Page %CURRENT_PAGE% of %TOTAL_PAGES%' => __('Page %CURRENT_PAGE% of %TOTAL_PAGES%', 'newsmag'),
			    'Next' => __('Next', 'newsmag'),
			    'Prev' => __('Prev', 'newsmag'),
			    'Back' => __('Back', 'newsmag'),


			    'No results for your search' => __('No results for your search', 'newsmag'),
			    'No posts to display' => __('No posts to display', 'newsmag'),

			    //modal window
			    'LOG IN'  => __('LOG IN', 'newsmag'),
			    'Sign in / Join'  => __('Sign in / Join', 'newsmag'),
			    'Sign in' => __('Sign in', 'newsmag'),
			    'Sign up' => __('Sign up', 'newsmag'),
			    'Join' => __('Join', 'newsmag'),
			    'Log In'  => __('Log In', 'newsmag'),
			    'Login'  => __('Login', 'newsmag'),
			    'REGISTER'  => __('REGISTER', 'newsmag'),
			    'Welcome!' => __('Welcome!', 'newsmag'),
			    'Log into your account' => __('Log into your account', 'newsmag'),
			    'Password recovery' => __('Password recovery', 'newsmag'),
			    'Send My Pass'  => __('Send My Pass', 'newsmag'),
			    'Send My Password'  => __('Send My Password', 'newsmag'),
			    'Forgot your password?'  => __('Forgot your password?', 'newsmag'),
			    'Forgot your password? Get help'  => __('Forgot your password? Get help', 'newsmag'),
			    'Create an account'  => __('Create an account', 'newsmag'),
			    'Please wait...'  => __('Please wait...', 'newsmag'),
			    'User or password incorrect!'  => __('User or password incorrect!', 'newsmag'),
			    'Email or username incorrect!'  => __('Email or username incorrect!', 'newsmag'),
			    'Email incorrect!'  => __('Email incorrect!', 'newsmag'),
			    'User or email already exists!'  => __('User or email already exists!', 'newsmag'),
			    'Please check your email (inbox or spam folder), the password was sent there.'  => __('Please check your email (inbox or spam folder), the password was sent there.', 'newsmag'),
			    'Email address not found!'  => __('Email address not found!', 'newsmag'),
			    'Your password is reset, check your email.'  => __('Your password is reset, check your email.', 'newsmag'),
			    'Welcome! Log into your account' => __('Welcome! Log into your account', 'newsmag'),
			    'Welcome! Register for an account' => __('Welcome! Register for an account', 'newsmag'),
			    'Register for an account' => __('Register for an account', 'newsmag'),
			    'Recover your password' => __('Recover your password', 'newsmag'),
			    'your username' => __('your username', 'newsmag'),
			    'your password' => __('your password', 'newsmag'),
			    'your email' => __('your email', 'newsmag'),
			    'A password will be e-mailed to you.' => __('A password will be e-mailed to you.', 'newsmag'),
			    'Logout' => __('Logout', 'newsmag'),

			    //social counters
			    'Like' => __('Like', 'newsmag'),
			    'Likes' => __('Likes', 'newsmag'),
			    'Fans' => __('Fans', 'newsmag'),
			    'Follow' => __('Follow', 'newsmag'),
			    'Followers' => __('Followers', 'newsmag'),
			    'Subscribe' => __('Subscribe', 'newsmag'),
			    'Subscribers' => __('Subscribers', 'newsmag'),

			    //more article box
			    'MORE STORIES' => __('MORE STORIES', 'newsmag'),

			    //filter drop down options on category page
			    'Latest' => __('Latest', 'newsmag'),
			    'Featured posts' => __('Featured posts', 'newsmag'),
			    'Most popular' => __('Most popular', 'newsmag'),
			    '7 days popular' => __('7 days popular', 'newsmag'),
			    'By review score' => __('By review score', 'newsmag'),
			    'Random' => __('Random', 'newsmag'),

			    'Trending Now' => __('Trending Now', 'newsmag'),

			    //used in Popular Category widget (td_block_popular_categories.php file)
			    'POPULAR CATEGORY' => __('POPULAR CATEGORY', 'newsmag'),
			    'POPULAR POSTS' => __('POPULAR POSTS', 'newsmag'),
			    'EDITOR PICKS' => __('EDITOR PICKS', 'newsmag'),
			    'ABOUT US' => __('ABOUT US', 'newsmag'),
			    'About me' => __('About me', 'newsmag'),
			    'FOLLOW US' => __('FOLLOW US', 'newsmag'),
			    'EVEN MORE NEWS' => __('EVEN MORE NEWS', 'newsmag'),


			    //magnific popup
			    'Previous (Left arrow key)' => __('Previous (Left arrow key)', 'newsmag'),
			    'Next (Right arrow key)' => __('Next (Right arrow key)', 'newsmag'),
			    '%curr% of %total%' => __('%curr% of %total%', 'newsmag'),
			    'The content from %url% could not be loaded.' => __('The content from %url% could not be loaded.', 'newsmag'),
			    'The image #%curr% could not be loaded.' => __('The image #%curr% could not be loaded.', 'newsmag'),

			    //blog
			    'Blog' => __('Blog', 'newsmag'),
			    'Share on Facebook' => __('Share on Facebook', 'newsmag'),
			    'Tweet on Twitter' => __('Tweet on Twitter', 'newsmag'),

			    'Featured' => __('Featured', 'newsmag'),
			    'All time popular' => __('All time popular', 'newsmag'),

			    'More' => __('More', 'newsmag'),
			    'Register' => __('Register', 'newsmag'),

			    'of' => __('of', 'newsmag'),

			    //exchange currencies
			    'Euro Member Countries' => __('Euro Member Countries', 'newsmag'),
			    'Australian Dollar' => __('Australian Dollar', 'newsmag'),
			    'Bulgarian Lev' => __('Bulgarian Lev', 'newsmag'),
			    'Brazilian Real' => __('Brazilian Real', 'newsmag'),
			    'Canadian Dollar' => __('Canadian Dollar', 'newsmag'),
			    'Swiss Franc' => __('Swiss Franc', 'newsmag'),
			    'Chinese Yuan Renminbi' => __('Chinese Yuan Renminbi', 'newsmag'),
			    'Czech Republic Koruna' => __('Czech Republic Koruna', 'newsmag'),
			    'Danish Krone' => __('Danish Krone', 'newsmag'),
			    'British Pound' => __('British Pound', 'newsmag'),
			    'Hong Kong Dollar' => __('Hong Kong Dollar', 'newsmag'),
			    'Croatian Kuna' => __('Croatian Kuna', 'newsmag'),
			    'Hungarian Forint' => __('Hungarian Forint', 'newsmag'),
			    'Indonesian Rupiah' => __('Indonesian Rupiah', 'newsmag'),
			    'Israeli Shekel' => __('Israeli Shekel', 'newsmag'),
			    'Indian Rupee' => __('Indian Rupee', 'newsmag'),
			    'Japanese Yen' => __('Japanese Yen', 'newsmag'),
			    'Korean (South) Won' => __('Korean (South) Won', 'newsmag'),
			    'Mexican Peso' => __('Mexican Peso', 'newsmag'),
			    'Malaysian Ringgit' => __('Malaysian Ringgit', 'newsmag'),
			    'Norwegian Krone' => __('Norwegian Krone', 'newsmag'),
			    'New Zealand Dollar' => __('New Zealand Dollar', 'newsmag'),
			    'Philippine Peso' => __('Philippine Peso', 'newsmag'),
			    'Polish Zloty' => __('Polish Zloty', 'newsmag'),
			    'Romanian (New) Leu' => __('Romanian (New) Leu', 'newsmag'),
			    'Russian Ruble' => __('Russian Ruble', 'newsmag'),
			    'Swedish Krona' => __('Swedish Krona', 'newsmag'),
			    'Singapore Dollar' => __('Singapore Dollar', 'newsmag'),
			    'Thai Baht' => __('Thai Baht', 'newsmag'),
			    'Turkish Lira' => __('Turkish Lira', 'newsmag'),
			    'United States Dollar' => __('United States Dollar', 'newsmag'),
			    'South African Rand' => __('South African Rand', 'newsmag'),


			    'Save my name, email, and website in this browser for the next time I comment.' => __('Save my name, email, and website in this browser for the next time I comment.', 'newsmag'),
			    'Privacy Policy' => 'Privacy Policy',

			);
		}, 11);


    } // end hook


    /**
     * This array is used to add the custom_title and custom_url of the block, it also loads the atts from the current global td_block_template
     * on visual composer we remove the block_template_id att in the UI @see td_vc_edit_form_fields_after_render
     * @return array
     */
    static function get_map_block_general_array() {
        $map_block_general_array = array();

        $td_block_template_id = td_options::get('tds_global_block_template', 'td_block_template_1');

        foreach (td_api_block_template::get_all() as $block_template_id => $block_template_settings) {

            if ($td_block_template_id === $block_template_id) {

                $map_block_general_array[] = array(
                    "param_name" => "separator",
                    "type"       => "text_separator",
                    'heading'    => 'Header settings',
                    "value"      => "",
                    "class"      => "",
                );
                $map_block_general_array[] = array(
                    "param_name" => "custom_title",
                    "type" => "textfield",
                    "value" => "",
                    "heading" => 'Custom title:',
                    "description" => "Optional - a title for this block, if you leave it blank the block will not have a title",
                    "holder" => "div",
                    "class" => "tdc-textfield-extrabig",
                );
                $map_block_general_array[] = array(
                    "param_name" => "custom_url",
                    "type" => "textfield",
                    "value" => "",
                    "heading" => 'Title url:',
                    "description" => "Optional - a custom url when the block title is clicked",
                    "holder" => "div",
                    "class" => "tdc-textfield-extrabig",
                );
                $map_block_general_array[] = array(
                    "param_name" => "separator",
                    "type"       => "horizontal_separator",
                    "value"      => "",
                    "class"      => "tdc-separator-small",
                );
                $map_block_general_array[] = array(
                    "param_name" => "block_template_id",
                    "type" => "dropdown",
                    "value" => td_util::get_block_template_ids(),
                    "heading" => 'Header template:',
                    "description" => "Header template used by the current block",
                    "holder" => "div",
                    "class" => "tdc-dropdown-big"
                );
                $map_block_general_array[] = array(
                    "param_name" => "separator",
                    "type"       => "horizontal_separator",
                    "value"      => "",
                    "class"      => "tdc-separator-small",
                );
                $map_block_general_array[] = array(
                    "param_name" => "border_top",
                    "type" => "dropdown",
                    "value" => array('- With border -' => '', 'No border' => 'no_border_top'),
                    "heading" => 'Border top:',
                    "description" => "By default all the blocks have a border at the top. You may wish to remove that in some cases (like when the block it's the first in a sidebar)",
                    "holder" => "div",
                    "class" => "tdc-dropdown-big"
                );
                $map_block_general_array[] = array(
                    "param_name" => "color_preset",
                    "type" => "dropdown",
                    "value" => array('- Default -' => '', 'Style 1 - Red' => 'td-block-color-style-1', 'Style 2 - Black' => 'td-block-color-style-2', 'Style 3 - Orange' => 'td-block-color-style-3', 'Style 4 - Yellow' => 'td-block-color-style-4', 'Style 5 - Green' => 'td-block-color-style-5', 'Style 6 - Pink' => 'td-block-color-style-6'),
                    "heading" => 'Color preset (background style):',
                    "description" => "Choose a color preset for this block. You can customize the presets in Theme panel -> Block settings.",
                    "holder" => "div",
                    "class" => "tdc-dropdown-big"
                );

                break;
            }
        }

        return $map_block_general_array;
    }

}
