コード例 #1
0
/**
 * Register sidebars for CargoPress
 *
 * @package CargoPress
 */
function cargopress_sidebars()
{
    // Blog Sidebar
    register_sidebar(array('name' => _x('Blog Sidebar', 'backend', 'cargopress-pt'), 'id' => 'blog-sidebar', 'description' => _x('Sidebar on the blog layout.', 'backend', 'cargopress-pt'), 'class' => 'blog  sidebar', 'before_widget' => '<div class="widget  %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="sidebar__headings">', 'after_title' => '</h4>'));
    // Regular Page Sidebar
    register_sidebar(array('name' => _x('Regular Page Sidebar', 'backend', 'cargopress-pt'), 'id' => 'regular-page-sidebar', 'description' => _x('Sidebar on the regular page.', 'backend', 'cargopress-pt'), 'class' => 'sidebar', 'before_widget' => '<div class="widget  %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="sidebar__headings">', 'after_title' => '</h4>'));
    // woocommerce shop sidebar
    if (CargoPressHelpers::is_woocommerce_active()) {
        register_sidebar(array('name' => _x('Shop Sidebar', 'backend', 'cargopress-pt'), 'id' => 'shop-sidebar', 'description' => _x('Sidebar for the shop page', 'backend', 'cargopress-pt'), 'class' => 'sidebar', 'before_widget' => '<div class="widget  %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="sidebar__headings">', 'after_title' => '</h4>'));
    }
    // Header
    register_sidebar(array('name' => _x('Header', 'backend', 'cargopress-pt'), 'id' => 'header-widgets', 'description' => _x('Header area for Icon Box and Social Icons widgets.', 'backend', 'cargopress-pt'), 'before_widget' => '<div class="widget  %2$s">', 'after_widget' => '</div>'));
    // Navigation
    register_sidebar(array('name' => _x('Navigation', 'backend', 'cargopress-pt'), 'id' => 'navigation-widgets', 'description' => _x('Navigation area for Social Icons widgets.', 'backend', 'cargopress-pt'), 'before_widget' => '<div class="widget  %2$s">', 'after_widget' => '</div>'));
    // Footer
    $footer_widgets_num = count(CargoPressHelpers::footer_widgets_layout_array());
    // only register if not 0
    if ($footer_widgets_num > 0) {
        register_sidebar(array('name' => _x('Footer', 'backend', 'cargopress-pt'), 'id' => 'footer-widgets', 'description' => sprintf(_x('Footer area works best with %d widgets. This number can be changed in the Appearance &rarr; Customize &rarr; Theme Options &rarr; Footer.', 'backend', 'cargopress-pt'), $footer_widgets_num), 'before_widget' => '<div class="col-xs-12  col-md-__col-num__"><div class="widget  %2$s">', 'after_widget' => '</div></div>', 'before_title' => '<h6 class="footer-top__headings">', 'after_title' => '</h6>'));
    }
}
コード例 #2
0
ファイル: filters.php プロジェクト: apeachdev/bioconSite
 /**
  * Filter the dynamic sidebars and alter the BS col classes for the footer wigets
  * @param  array $params
  * @return array
  */
 function footer_widgets_params($params)
 {
     static $counter = 0;
     static $first_row = true;
     $footer_widgets_layout_array = CargoPressHelpers::footer_widgets_layout_array();
     if ('footer-widgets' === $params[0]['id']) {
         // 'before_widget' contains __col-num__, see inc/theme-sidebars.php
         $params[0]['before_widget'] = str_replace('__col-num__', $footer_widgets_layout_array[$counter], $params[0]['before_widget']);
         // first widget in the any non-first row
         if (false === $first_row && 0 === $counter) {
             $params[0]['before_widget'] = '</div><div class="row">' . $params[0]['before_widget'];
         }
         $counter++;
     }
     end($footer_widgets_layout_array);
     if ($counter > key($footer_widgets_layout_array)) {
         $counter = 0;
         $first_row = false;
     }
     return $params;
 }
コード例 #3
0
<div class="main-title" style="<?php 
echo esc_attr($style_attr);
?>
">
	<div class="container">
		<?php 
$main_tag = 'h1';
$subtitle = false;
if (is_home() || is_single() && 'post' === get_post_type()) {
    $title = get_the_title($blog_id);
    $subtitle = get_field('subtitle', $blog_id);
    if (is_single()) {
        $main_tag = 'h2';
    }
} elseif (CargoPressHelpers::is_woocommerce_active() && is_woocommerce()) {
    ob_start();
    woocommerce_page_title();
    $title = ob_get_clean();
    $subtitle = get_field('subtitle', (int) get_option('woocommerce_shop_page_id'));
} elseif (is_category() || is_tag() || is_author() || is_post_type_archive() || is_tax() || is_day() || is_month() || is_year()) {
    $title = get_the_archive_title();
} elseif (is_search()) {
    $title = __('Search Results For', 'cargopress-pt') . ' &quot;' . get_search_query() . '&quot;';
} elseif (is_404()) {
    $title = __('Error 404', 'cargopress-pt');
} else {
    $title = get_the_title();
    $subtitle = get_field('subtitle');
}
?>
コード例 #4
0
if (has_category()) {
    ?>
<span class="meta-data__categories"><?php 
    _e('', 'cargopress-pt');
    ?>
 <?php 
    the_category(' &bull; ');
    ?>
</span><span class="meta-data__separator">/</span><?php 
}
?>
	<?php 
if (has_tag()) {
    ?>
<span class="meta-data__tags"><?php 
    _e('', 'cargopress-pt');
    ?>
 <?php 
    the_tags('', ' &bull; ');
    ?>
</span><span class="meta-data__separator">/</span><?php 
}
?>
	<span class="meta-data__comments"><a href="<?php 
comments_link();
?>
"><?php 
CargoPressHelpers::pretty_comments_number();
?>
</a></span>
</div>
コード例 #5
0
ファイル: footer.php プロジェクト: apeachdev/bioconSite
<?php

/**
 * Footer
 *
 * @package CargoPress
 */
$footer_widgets_layout = CargoPressHelpers::footer_widgets_layout_array();
?>

	<footer class="footer" role="contentinfo">
		<?php 
if (!empty($footer_widgets_layout) && is_active_sidebar('footer-widgets')) {
    ?>
		<div class="footer-top">
			<div class="container">
				<div class="row">
					<?php 
    dynamic_sidebar('footer-widgets');
    ?>
				</div>
			</div>
		</div>
		<?php 
}
?>
		<div class="footer-bottom">
			<div class="container">
				<div class="footer-bottom__left">
					<?php 
echo apply_filters('cargopress/footer_left_txt', get_theme_mod('footer_left_txt', ''));
コード例 #6
0
?>
">
	<div class="carousel  slide  js-jumbotron-slider" id="headerCarousel" data-ride="carousel" <?php 
printf('data-interval="%s"', get_field('auto_cycle') ? get_field('cycle_interval') : 'false');
?>
>

		<!-- Wrapper for slides -->
		<div class="carousel-inner">
		<?php 
$i = -1;
while (have_rows('slides')) {
    the_row();
    $i++;
    $slider_sizes = array('cargopress-jumbotron-slider-l', 'cargopress-jumbotron-slider-s');
    $slide_image_srcset = CargoPressHelpers::get_slide_sizes(get_sub_field('slide_image'), $slider_sizes);
    $slide_link = get_sub_field('slide_link');
    $slider_src_img = wp_get_attachment_image_src(get_sub_field('slide_image'), 'jumbotron-slider-s');
    ?>

			<div class="item <?php 
    echo 0 === $i ? ' active' : '';
    ?>
">
				<?php 
    if (!empty($slide_link) && 'link' === get_field('slider_content')) {
        ?>
					<a href="<?php 
        echo esc_url($slide_link);
        ?>
" target="<?php 
コード例 #7
0
ファイル: functions.php プロジェクト: apeachdev/bioconSite
 function cargopress_enqueue_google_web_fonts()
 {
     wp_enqueue_style('google-fonts', CargoPressHelpers::google_web_fonts_url(), array(), null);
 }
コード例 #8
0
ファイル: header.php プロジェクト: apeachdev/bioconSite
	<?php 
}
?>

	<div class="header__container">
		<div class="container">
			<header class="header" role="banner">
				<div class="header__logo">
					<a href="<?php 
echo esc_url(home_url());
?>
">
					<?php 
$logo = get_theme_mod('logo_img', false);
$logo2x = get_theme_mod('logo2x_img', false);
$logo_width_height = CargoPressHelpers::get_logo_dimensions();
if (!empty($logo)) {
    ?>
							<img src="<?php 
    echo esc_url($logo);
    ?>
" alt="<?php 
    echo esc_attr(get_bloginfo('name'));
    ?>
" srcset="<?php 
    echo esc_attr($logo);
    echo empty($logo2x) ? '' : ', ' . esc_url($logo2x) . ' 2x';
    ?>
" class="img-responsive" <?php 
    echo sanitize_text_field($logo_width_height);
    ?>
コード例 #9
0
 /**
  * This hooks into 'customize_register' (available as of WP 3.4) and allows
  * you to add new sections and controls to the Theme Customize screen.
  *
  * Note: To enable instant preview, we have to actually write a bit of custom
  * javascript. See live_preview() for more.
  *
  * @see add_action('customize_register',$func)
  */
 public function register()
 {
     /**
      * Settings
      */
     // branding
     $this->wp_customize->add_setting('logo_img');
     $this->wp_customize->add_setting('logo2x_img');
     $this->wp_customize->add_setting('logo_top_margin', array('default' => '35'));
     $this->wp_customize->add_setting('header_logo_width', array('default' => '270'));
     $this->wp_customize->add_setting('favicon');
     // header
     $this->wp_customize->add_setting('top_bar_visibility', array('default' => 'yes'));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'top_bar_bg', array('default' => '#f5f5f5', 'css_map' => array('background-color' => array('.top', '.top-navigation .sub-menu > li > a'), 'border-bottom-color|darken(3)' => array('.top', '.top-navigation .sub-menu > li > a'), 'border-left-color|darken(3)' => array('.top-navigation .sub-menu > li > .sub-menu')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'top_bar_color', array('default' => '#aaaaaa', 'css_map' => array('color' => array('.top', '.top-navigation > li > a', '.top-navigation .sub-menu > li > a'), 'color|darken(10)' => array('.top-navigation > li > a:hover', '.top-navigation > li > a:focus', '.top-navigation .sub-menu > li > a:focus', '.top-navigation .sub-menu > li > a:hover')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'header_bg', array('default' => '#ffffff', 'css_map' => array('background-color' => array('.header__widgets', '.header__logo', '.header__container::before', '.header__container::after', '.header__logo::after', '.header__container|@media (max-width: 992px)', '.main-navigation .sub-menu>li>a|@media (max-width: 992px)')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'header_text', array('default' => '#aaaaaa', 'css_map' => array('color' => array('.header', '.header .icon-box__title'), 'color|darken(39)' => array('.header .icon-box__subtitle')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'breadcrumbs_bg', array('default' => '#ffffff', 'css_map' => array('background-color' => array('.breadcrumbs'), 'background-color|darken(10)' => array('.breadcrumbs a::before', '.breadcrumbs a::after')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'breadcrumbs_color', array('default' => '#444444', 'css_map' => array('color' => array('.breadcrumbs a'), 'color|darken(5)' => array('.breadcrumbs a:hover')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'breadcrumbs_color_active', array('default' => '#aaaaaa', 'css_map' => array('color' => array('.breadcrumbs')))));
     // navigation
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_navigation_bg', array('default' => '#1f425d', 'css_map' => array('background-color' => array('.header__container|@media (min-width: 992px)', '.navbar-toggle', '.jumbotron'), 'background-color|darken(10)' => array('.navbar-toggle:hover')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_navigation_color', array('default' => '#ffffff', 'css_map' => array('color' => array('.main-navigation > li > a|@media (min-width: 992px)', '.main-navigation .menu-item-has-children::after|@media (min-width: 992px)', '.main-navigation > li:hover > a|@media (min-width: 992px)', '.main-navigation > li:focus > a|@media (min-width: 992px)')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_navigation_sub_bg', array('default' => '#ffffff', 'css_map' => array('background-color' => array('.main-navigation .menu-item-has-children:hover > a|@media (min-width: 992px)', '.main-navigation .sub-menu > li > a|@media (min-width: 992px)', '.main-navigation ul.sub-menu|@media (min-width: 992px)')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_navigation_sub_color', array('default' => '#999999', 'css_map' => array('color' => array('.main-navigation .sub-menu > li > a|@media (min-width: 992px)', '.main-navigation .sub-menu .menu-item-has-children::after|@media (min-width: 992px)')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_navigation_sub_color_hover', array('default' => '#1f425d', 'css_map' => array('color' => array('.main-navigation .menu-item-has-children:hover > a|@media (min-width: 992px)', '.main-navigation .sub-menu > li > a:hover|@media (min-width: 992px)', '.main-navigation .menu-item-has-children:hover::after|@media (min-width: 992px)', '.main-navigation .sub-menu .menu-item-has-children:hover::after|@media (min-width: 992px)')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_navigation_link_mobile_color', array('default' => '#444444', 'css_map' => array('color' => array('.main-navigation > li > a|@media (max-width: 992px)')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_navigation_link_mobile_color_hover', array('default' => '#1f425d', 'css_map' => array('color' => array('.main-navigation > li:hover > a|@media (max-width: 992px)', '.main-navigation > li:focus > a|@media (max-width: 992px)')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_navigation_sub_link_mobile_color', array('default' => '#999999', 'css_map' => array('color' => array('.main-navigation .sub-menu > li > a|@media (max-width: 992px)')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_navigation_sub_link_mobile_color_hover', array('default' => '#1f425d', 'css_map' => array('color' => array('.main-navigation .sub-menu > li > a:hover|@media (max-width: 992px)')))));
     // main title area
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_title_bg_img', array('css_map' => array('background-image|url' => array('.main-title')))));
     $this->wp_customize->add_setting('main_title_bg_gradient_setting', array('default' => array('start_color' => '#f5f5f5', 'stop_color' => '#eeeeee', 'is_gradient' => true, 'gradient_angle' => 90)));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_title_color', array('default' => '#444444', 'css_map' => array('color' => array('.main-title h1', '.main-title h2')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'main_subtitle_color', array('default' => '#aaaaaa', 'css_map' => array('color' => array('.main-title h3')))));
     // typography
     $this->wp_customize->add_setting('charset_setting', array('default' => 'latin'));
     // theme layout & color
     $this->wp_customize->add_setting('layout_mode', array('default' => 'wide'));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'text_color', array('default' => '#aaaaaa', 'css_map' => array('color' => array('body', '.widget_pw_icon_box .icon-box__subtitle')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'headings_color', array('default' => '#444444', 'css_map' => array('color' => array('h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hentry__title', '.hentry__title a', '.page-box__title a')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'primary_color', array('default' => '#e21f2f', 'css_map' => array('color' => array('.header .icon-box .fa', '.number-counter__icon', 'hr.hr-quote::after'), 'background-color' => array('.latest-news__date', '.sticky .btn--post', '.main-navigation > .current-menu-item > a::after', '.main-navigation > li:hover > a::after', '.main-navigation > li:focus > a::after', 'body.woocommerce-page span.onsale', '.woocommerce span.onsale'), 'border-top-color|darken(8)' => array('.latest-news__date::after'), 'border-color' => array('.sticky .btn--post')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'primary_button_color', array('default' => '#4ab9cf', 'css_map' => array('color' => array(), 'background-color' => array('.btn-info', '.btn-primary', '.testimonial__quote::before', '.widget_search .search-submit', '.sidebar .widget_nav_menu ul > li.current-menu-item a', '.pagination .current', 'body.woocommerce-page .widget_shopping_cart_content .buttons .checkout', 'body.woocommerce-page nav.woocommerce-pagination ul li span.current', 'body.woocommerce-page button.button.alt', 'body.woocommerce-page div.product .woocommerce-tabs ul.tabs li.active', 'body.woocommerce-page .woocommerce-error a.button', 'body.woocommerce-page .woocommerce-info a.button', 'body.woocommerce-page .woocommerce-message a.button', '.woocommerce-cart .wc-proceed-to-checkout a.checkout-button', 'body.woocommerce-page #payment #place_order', 'body.woocommerce-page #review_form #respond input#submit', '.woocommerce button.button.alt:disabled', '.woocommerce button.button.alt:disabled:hover', '.woocommerce button.button.alt:disabled[disabled]', '.woocommerce button.button.alt:disabled[disabled]:hover', '.widget_calendar caption'), 'border-color' => array('.btn-info', '.btn-primary', 'body.woocommerce-page .widget_shopping_cart_content .buttons .checkout'), 'background-color|darken(5)' => array('.btn-info:hover', '.open > .btn-info.dropdown-toggle', '.btn-info.active', '.btn-info.focus', '.btn-info:active', '.btn-info:focus', '.btn-primary:hover', '.btn-primary:focus', '.btn-primary:active', '.open > .btn-primary.dropdown-toggle', '.btn-primary.active', '.btn-primary.focus', '.widget_search .search-submit:hover', '.widget_search .search-submit:focus', 'body.woocommerce-page .widget_shopping_cart_content .buttons .checkout:hover', 'body.woocommerce-page button.button.alt:hover', 'body.woocommerce-page .woocommerce-error a.button:hover', 'body.woocommerce-page .woocommerce-info a.button:hover', 'body.woocommerce-page .woocommerce-message a.button:hover', '.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover', 'body.woocommerce-page #payment #place_order:hover', 'body.woocommerce-page #review_form #respond input#submit:hover'), 'border-color|darken(5)' => array('.btn-info:hover', '.open > .btn-info.dropdown-toggle', '.btn-info.active', '.btn-info.focus', '.btn-info:active', '.btn-info:focus', '.btn-primary:hover', '.btn-primary:focus', '.btn-primary:active', '.open > .btn-primary.dropdown-toggle', '.btn-primary.active', '.btn-primary.focus', 'body.woocommerce-page .widget_shopping_cart_content .buttons .checkout:hover')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'link_color', array('default' => '#4ab9cf', 'css_map' => array('color' => array('a', '.latest-news--more-news::after', '.widget_pw_icon_box .icon-box:hover .fa', 'body.woocommerce-page ul.products li.product a:hover img', '.woocommerce ul.products li.product a:hover img', 'body.woocommerce-page ul.products li.product .price', '.woocommerce ul.products li.product .price', 'body.woocommerce-page .star-rating', '.woocommerce .star-rating', 'body.woocommerce-page div.product p.price', 'body.woocommerce-page p.stars a'), 'color|darken(5)' => array('a:hover', 'a:focus'), 'border-bottom-color' => array('.widget_pw_icon_box .icon-box:hover', '.logo-panel img:hover')))));
     // shop
     $this->wp_customize->add_setting('products_per_page', array('default' => 12));
     $this->wp_customize->add_setting('single_product_sidebar', array('default' => 'left'));
     // footer
     $this->wp_customize->add_setting('footer_widgets_layout', array('default' => '4,6,8'));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'footer_bg_color', array('default' => '#1f425d', 'css_map' => array('background-color' => array('.footer-top', '.footer::before', '.footer::after', '.footer-top::before', '.footer-top::after')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'footer_title_color', array('default' => '#ffffff', 'css_map' => array('color' => array('.footer-top__headings')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'footer_text_color', array('default' => '#9eb7cb', 'css_map' => array('color' => array('.footer-top', '.footer-top .textwidget')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'footer_link_color', array('default' => '#9eb7cb', 'css_map' => array('color' => array('.footer .widget_nav_menu ul > li > a')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'footer_bottom_bg_color', array('default' => '#162f42', 'css_map' => array('background-color' => array('.footer-bottom')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'footer_bottom_text_color', array('default' => '#577186', 'css_map' => array('color' => array('.footer-bottom')))));
     $this->wp_customize->add_setting(new ProteusThemes_Customize_Setting_Dynamic_CSS($this->wp_customize, 'footer_bottom_link_color', array('default' => '#eeeeee', 'css_map' => array('color' => array('.footer-bottom a'), 'color|lighten(5)' => array('.footer-bottom a:hover')))));
     $this->wp_customize->add_setting('footer_left_txt', array('default' => 'CargoPress Theme Made by <a href="https://www.proteusthemes.com/">ProteusThemes</a>.'));
     $this->wp_customize->add_setting('footer_right_txt', array('default' => 'Copyright &copy; 2009–2015 CargoPress. All rights reserved.'));
     // custom code (css/js)
     $this->wp_customize->add_setting('custom_css', array('default' => ''));
     $this->wp_customize->add_setting('custom_js_head');
     $this->wp_customize->add_setting('custom_js_footer');
     // updates
     $this->wp_customize->add_setting('tf_username');
     $this->wp_customize->add_setting('tf_api_key');
     // acf
     $this->wp_customize->add_setting('show_acf', array('default' => 'no'));
     /**
      * Panel and Sections
      */
     // one ProteusThemes panel to rule them all
     $this->wp_customize->add_panel('panel_cargopress', array('title' => _x('[PT] Theme Options', 'backend', 'cargopress-pt'), 'description' => _x('All CargoPress theme specific settings.', 'backend', 'cargopress-pt'), 'priority' => 10));
     // individual sections
     $this->wp_customize->add_section('cargopress_section_logos', array('title' => _x('Logo &amp; Favicon', 'backend', 'cargopress-pt'), 'description' => _x('Logo &amp; Favicon for the CargoPress theme.', 'backend', 'cargopress-pt'), 'priority' => 10, 'panel' => 'panel_cargopress'));
     // Header
     $this->wp_customize->add_section('cargopress_section_header', array('title' => _x('Header &amp; Breadcrumbs', 'backend', 'cargopress-pt'), 'description' => _x('All layout and appearance settings for the header and breadcrumbs.', 'backend', 'cargopress-pt'), 'priority' => 20, 'panel' => 'panel_cargopress'));
     $this->wp_customize->add_section('cargopress_section_navigation', array('title' => _x('Navigation', 'backend', 'cargopress-pt'), 'description' => _x('Navigation for the CargoPress theme.', 'backend', 'cargopress-pt'), 'priority' => 30, 'panel' => 'panel_cargopress'));
     $this->wp_customize->add_section('cargopress_section_main_title', array('title' => _x('Main Title Area', 'backend', 'cargopress-pt'), 'description' => _x('All layout and appearance settings for the main title area (regular pages).', 'backend', 'cargopress-pt'), 'priority' => 33, 'panel' => 'panel_cargopress'));
     $this->wp_customize->add_section('cargopress_section_typography', array('title' => _x('Typography', 'backend', 'cargopress-pt'), 'priority' => 35, 'panel' => 'panel_cargopress'));
     $this->wp_customize->add_section('cargopress_section_theme_colors', array('title' => _x('Theme Layout &amp; Colors', 'backend', 'cargopress-pt'), 'priority' => 40, 'panel' => 'panel_cargopress'));
     if (CargoPressHelpers::is_woocommerce_active()) {
         $this->wp_customize->add_section('cargopress_section_shop', array('title' => _x('Shop', 'backend', 'cargopress-pt'), 'priority' => 80, 'panel' => 'panel_cargopress'));
     }
     $this->wp_customize->add_section('section_footer', array('title' => _x('Footer', 'backend', 'cargopress-pt'), 'description' => _x('All layout and appearance settings for the footer.', 'backend', 'cargopress-pt'), 'priority' => 90, 'panel' => 'panel_cargopress'));
     $this->wp_customize->add_section('section_custom_code', array('title' => _x('Custom Code', 'backend', 'cargopress-pt'), 'priority' => 100, 'panel' => 'panel_cargopress'));
     $this->wp_customize->add_section('section_updates', array('title' => _x('Automatic Updates', 'backend', 'cargopress-pt'), 'description' => _x('If you fill out the two fields below, you will get notified when the theme update is available and you will be able to update with just one click. Please note that all the changes you will make in the code directly will be overwritten with the updates. Use the <a href="http://codex.wordpress.org/Child_Themes" target="_blank">Child Themes</a> to alter the code.', 'backend', 'cargopress-pt'), 'priority' => 110, 'panel' => 'panel_cargopress'));
     $this->wp_customize->add_section('section_other', array('title' => _x('Other', 'backend', 'cargopress-pt'), 'priority' => 150, 'panel' => 'panel_cargopress'));
     /**
      * Controls
      */
     // Section: cargopress_section_logos
     $this->wp_customize->add_control(new WP_Customize_Image_Control($this->wp_customize, 'logo_img', array('label' => _x('Logo Image', 'backend', 'cargopress-pt'), 'description' => _x('Max height for the logo image is 120px.', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_logos')));
     $this->wp_customize->add_control(new WP_Customize_Image_Control($this->wp_customize, 'logo2x_img', array('label' => _x('Retina Logo Image', 'backend', 'cargopress-pt'), 'description' => _x('2x logo size, for screens with high DPI.', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_logos')));
     $this->wp_customize->add_control('logo_top_margin', array('type' => 'number', 'label' => _x('Logo top margin', 'backend', 'cargopress-pt'), 'description' => _x('In pixels.', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_logos', 'input_attrs' => array('min' => 0, 'max' => 120, 'step' => 10)));
     $this->wp_customize->add_control('header_logo_width', array('type' => 'range', 'label' => _x('Logo width', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_logos', 'input_attrs' => array('min' => 10, 'max' => 600, 'step' => 5)));
     $this->wp_customize->add_control(new WP_Customize_Image_Control($this->wp_customize, 'favicon', array('label' => _x('Favicon Image', 'backend', 'cargopress-pt'), 'description' => _x('Recommended dimensions are 32 x 32px.', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_logos')));
     // Section: header
     $this->wp_customize->add_control('top_bar_visibility', array('type' => 'select', 'priority' => 0, 'label' => _x('Top bar visibility', 'backend', 'cargopress-pt'), 'description' => _x('Show or hide?', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_header', 'choices' => array('yes' => _x('Show', 'backend', 'cargopress-pt'), 'no' => _x('Hide', 'backend', 'cargopress-pt'))));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'top_bar_bg', array('priority' => 1, 'label' => _x('Top bar background color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_header')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'top_bar_color', array('priority' => 2, 'label' => _x('Top bar text color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_header')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'header_bg', array('priority' => 30, 'label' => _x('Header background color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_header')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'header_text', array('priority' => 32, 'label' => _x('Header text color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_header')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'breadcrumbs_bg', array('priority' => 60, 'label' => _x('Breadcrumbs background color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_header')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'breadcrumbs_color', array('priority' => 61, 'label' => _x('Breadcrumbs text color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_header')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'breadcrumbs_color_active', array('priority' => 62, 'label' => _x('Breadcrumbs active text color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_header')));
     // Section: cargopress_section_navigation
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_navigation_bg', array('priority' => 120, 'label' => _x('Main navigation background color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_navigation')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_navigation_color', array('priority' => 130, 'label' => _x('Main navigation link color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_navigation')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_navigation_sub_bg', array('priority' => 160, 'label' => _x('Main navigation submenu background', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_navigation')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_navigation_sub_color', array('priority' => 170, 'label' => _x('Main navigation submenu link color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_navigation')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_navigation_sub_color_hover', array('priority' => 175, 'label' => _x('Main navigation submenu link color hover', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_navigation')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_navigation_link_mobile_color', array('priority' => 180, 'label' => _x('Main navigation link color (mobile)', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_navigation')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_navigation_link_mobile_color_hover', array('priority' => 190, 'label' => _x('Main navigation link hover color (mobile)', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_navigation')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_navigation_sub_link_mobile_color', array('priority' => 200, 'label' => _x('Main navigation submenu link color (mobile)', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_navigation')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_navigation_sub_link_mobile_color_hover', array('priority' => 210, 'label' => _x('Main navigation submenu link hover color (mobile)', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_navigation')));
     // section: cargopress_section_main_title
     $this->wp_customize->add_control(new WP_Customize_Gradient_Control($this->wp_customize, 'main_title_bg_gradient_setting', array('priority' => 11, 'label' => _x('Main title background color', 'backend', 'cargopress-pt'), 'description' => _x('Select single color or a gradient. You can also change the angle of the gradient with the range control.', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_main_title')));
     $this->wp_customize->add_control(new WP_Customize_Image_Control($this->wp_customize, 'main_title_bg_img', array('priority' => 20, 'label' => _x('Main title background pattern', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_main_title')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_title_color', array('priority' => 30, 'label' => _x('Main title color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_main_title')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'main_subtitle_color', array('priority' => 31, 'label' => _x('Main subtitle color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_main_title')));
     // Section: cargopress_section_typography
     $this->wp_customize->add_control('charset_setting', array('type' => 'select', 'priority' => 0, 'label' => _x('Character set for Google Fonts', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_typography', 'choices' => array('latin' => 'Latin', 'latin-ext' => 'Latin Extended', 'cyrillic' => 'Cyrillic', 'cyrillic-ext' => 'Cyrillic Extended')));
     // Section: cargopress_section_theme_colors
     $this->wp_customize->add_control('layout_mode', array('type' => 'select', 'priority' => 10, 'label' => _x('Layout', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_theme_colors', 'choices' => array('wide' => _x('Wide', 'backend', 'cargopress-pt'), 'boxed' => _x('Boxed', 'backend', 'cargopress-pt'))));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'text_color', array('priority' => 30, 'label' => _x('Text color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_theme_colors')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'headings_color', array('priority' => 31, 'label' => _x('Headings color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_theme_colors')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'primary_color', array('priority' => 32, 'label' => _x('Primary color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_theme_colors')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'primary_button_color', array('priority' => 33, 'label' => _x('Primary Button color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_theme_colors')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'link_color', array('priority' => 34, 'label' => _x('Link color', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_theme_colors')));
     // Section: cargopress_section_shop
     if (CargoPressHelpers::is_woocommerce_active()) {
         $this->wp_customize->add_control('products_per_page', array('label' => _x('Number of products per page', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_shop'));
         $this->wp_customize->add_control('single_product_sidebar', array('label' => _x('Sidebar on single product page', 'backend', 'cargopress-pt'), 'section' => 'cargopress_section_shop', 'type' => 'select', 'choices' => array('none' => _x('No sidebar', 'backend', 'cargopress-pt'), 'left' => _x('Left', 'backend', 'cargopress-pt'), 'right' => _x('Right', 'backend', 'cargopress-pt'))));
     }
     // Section: section_footer
     $this->wp_customize->add_control(new WP_Customize_Range_Control($this->wp_customize, 'footer_widgets_layout', array('priority' => 1, 'label' => _x('Footer widgets layout', 'backend', 'cargopress-pt'), 'description' => _x('Select number of widget you want in the footer and then with the slider rearrange the layout', 'backend', 'cargopress-pt'), 'section' => 'section_footer', 'input_attrs' => array('min' => 0, 'max' => 12, 'step' => 1, 'maxCols' => 6))));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'footer_bg_color', array('priority' => 10, 'label' => _x('Footer background color', 'backend', 'cargopress-pt'), 'section' => 'section_footer')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'footer_title_color', array('priority' => 30, 'label' => _x('Footer widget title color', 'backend', 'cargopress-pt'), 'section' => 'section_footer')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'footer_text_color', array('priority' => 31, 'label' => _x('Footer text color', 'backend', 'cargopress-pt'), 'section' => 'section_footer')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'footer_link_color', array('priority' => 32, 'label' => _x('Footer link color', 'backend', 'cargopress-pt'), 'section' => 'section_footer')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'footer_bottom_bg_color', array('priority' => 35, 'label' => _x('Footer bottom background color', 'backend', 'cargopress-pt'), 'section' => 'section_footer')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'footer_bottom_text_color', array('priority' => 36, 'label' => _x('Footer bottom text color', 'backend', 'cargopress-pt'), 'section' => 'section_footer')));
     $this->wp_customize->add_control(new WP_Customize_Color_Control($this->wp_customize, 'footer_bottom_link_color', array('priority' => 37, 'label' => _x('Footer bottom link color', 'backend', 'cargopress-pt'), 'section' => 'section_footer')));
     $this->wp_customize->add_control('footer_left_txt', array('type' => 'text', 'priority' => 110, 'label' => _x('Footer text on left', 'backend', 'cargopress-pt'), 'description' => _x('Before footer menu. You can use HTML.', 'backend', 'cargopress-pt'), 'section' => 'section_footer'));
     $this->wp_customize->add_control('footer_right_txt', array('type' => 'text', 'priority' => 120, 'label' => _x('Footer text on right', 'backend', 'cargopress-pt'), 'description' => _x('You can use HTML.', 'backend', 'cargopress-pt'), 'section' => 'section_footer'));
     // Section: section_custom_code
     $this->wp_customize->add_control('custom_css', array('type' => 'textarea', 'label' => _x('Custom CSS', 'backend', 'cargopress-pt'), 'description' => sprintf(_x('%s How to find CSS classes %s in the theme.', 'backend', 'cargopress-pt'), '<a href="https://www.youtube.com/watch?v=V2aAEzlvyDc" target="_blank">', '</a>'), 'section' => 'section_custom_code'));
     $this->wp_customize->add_control('custom_js_head', array('type' => 'textarea', 'label' => _x('Custom JavaScript (head)', 'backend', 'cargopress-pt'), 'description' => _x('You have to include the &lt;script&gt;&lt;/script&gt; tags as well. Paste your Google Analytics tracking code here.', 'backend', 'cargopress-pt'), 'section' => 'section_custom_code'));
     $this->wp_customize->add_control('custom_js_footer', array('type' => 'textarea', 'label' => _x('Custom JavaScript (footer)', 'backend', 'cargopress-pt'), 'description' => _x('You have to include the &lt;script&gt;&lt;/script&gt; tags as well.', 'backend', 'cargopress-pt'), 'section' => 'section_custom_code'));
     // Section: section_updates
     $this->wp_customize->add_control('tf_username', array('label' => _x('Your ThemeForest username', 'backend', 'cargopress-pt'), 'description' => _x('Your Envato marketplace (ThemeForest) username.', 'backend', 'cargopress-pt'), 'section' => 'section_updates'));
     $this->wp_customize->add_control('tf_api_key', array('label' => _x('Your ThemeForest API key', 'backend', 'cargopress-pt'), 'description' => _x('Your API key (<strong>not</strong> password). See <a href="https://www.diigo.com/item/p/pdbsqoszbspabboqezbcoserod" target="_blank">here</a> where you can generate your new API key on ThemeForest site.', 'backend', 'cargopress-pt'), 'section' => 'section_updates'));
     // Section: section_other
     $this->wp_customize->add_control('show_acf', array('type' => 'select', 'label' => _x('Show ACF admin panel?', 'backend', 'cargopress-pt'), 'description' => _x('If you want to use ACF and need the ACF admin panel set this to <strong>Yes</strong>. Do not change if you do not know what you are doing.', 'backend', 'cargopress-pt'), 'section' => 'section_other', 'choices' => array('no' => _x('No', 'backend', 'cargopress-pt'), 'yes' => _x('Yes', 'backend', 'cargopress-pt'))));
 }