<?php
add_action( 'customize_register', 'roxima_customize_register', 100 );
/**
 * Registers all theme-related options to the Customizer.
 *
 * @param WP_Customize_Manager $wpc Reference to the customizer's manager object.
 */
function roxima_customize_register( $wpc ) {

	$wpc->add_section( 'header', array(
		'title'       => esc_html_x( 'Header Options', 'customizer section title', 'roxima' ),
		'priority'    => 1
	) );

	$wpc->get_panel( 'nav_menus' )->priority = 2;

	$wpc->add_section( 'layout', array(
		'title'    => esc_html_x( 'Layout Options', 'customizer section title', 'roxima' ),
		'priority' => 20
	) );

	$wpc->add_section( 'typography', array(
		'title'    => _x( 'Typography Options', 'customizer section title', 'roxima' ),
		'priority' => 30
	) );

	$wpc->get_section( 'colors' )->title    = esc_html__( 'Content Colors', 'roxima' );
	$wpc->get_section( 'colors' )->priority = 40;

	$wpc->add_section( 'sidebar', array(
		'title'       => esc_html_x( 'Sidebar Colors', 'customizer section title', 'roxima' ),
		'description' => esc_html__( 'These options affect your sidebar (when visible).', 'roxima' ),
		'priority'    => 50
	) );

	// The following line doesn't work in a some PHP versions. Apparently, get_panel( 'widgets' ) returns an array,
	// therefore a cast to object is needed. http://wordpress.stackexchange.com/questions/160987/warning-creating-default-object-when-altering-customize-panels
	//$wpc->get_panel( 'widgets' )->priority = 55;
	$panel_widgets = (object) $wpc->get_panel( 'widgets' );
	$panel_widgets->priority = 55;

	$wpc->add_section( 'social', array(
		'title'       => esc_html_x( 'Social Networks', 'customizer section title', 'roxima' ),
		'description' => esc_html__( 'Enter your social network URLs. Leaving a URL empty will hide its respective icon.', 'roxima' ),
		'priority'    => 60
	) );

	$wpc->add_section( 'single_post', array(
		'title'       => esc_html_x( 'Posts Options', 'customizer section title', 'roxima' ),
		'description' => esc_html__( 'These options affect your individual posts.', 'roxima' ),
		'priority'    => 70
	) );

	$wpc->add_section( 'footer', array(
		'title'    => esc_html_x( 'Footer Options', 'customizer section title', 'roxima' ),
		'priority' => 100
	) );

	// Section 'static_front_page' is not defined when there are no pages.
	if ( get_pages() ) {
		$wpc->get_section( 'static_front_page' )->priority = 110;
	}

	$wpc->add_section( 'titles', array(
		'title'       => esc_html_x( 'Titles', 'customizer section title', 'roxima' ),
		'priority'    => 120
	) );

	$wpc->add_section( 'other', array(
		'title'       => esc_html_x( 'Other', 'customizer section title', 'roxima' ),
		'description' => esc_html__( 'Other options affecting the whole site.', 'roxima' ),
		'priority'    => 130
	) );



	//
	// Group options by registering the setting first, and the control right after.
	//

	//
	// Layout
	//
	$wpc->add_setting( 'layout_blog', array(
		'default'           => 'sidebar',
		'sanitize_callback' => 'roxima_sanitize_blog_layout',
	) );
	$wpc->add_control( 'layout_blog', array(
		'type'        => 'select',
		'section'     => 'layout',
		'label'       => esc_html__( 'Blog Layout', 'roxima' ),
		'description' => esc_html__( 'Applies to the blog page and blog-related pages.', 'roxima' ),
		'choices'     => array(
			'sidebar'   => esc_html_x( 'With Sidebar', 'blog layout', 'roxima' ),
			'fullwidth' => esc_html_x( 'Full Width', 'blog layout', 'roxima' ),
		),
	) );

	$wpc->add_setting( 'excerpt_length', array(
		'default'           => 55,
		'sanitize_callback' => 'absint',
	) );
	$wpc->add_control( 'excerpt_length', array(
		'type'        => 'number',
		'input_attrs' => array(
			'min'  => 10,
			'step' => 1,
		),
		'section'     => 'layout',
		'label'       => esc_html__( 'Automatically generated excerpt length (in words)', 'roxima' ),
	) );

	$wpc->add_setting( 'pagination_method', array(
		'default'           => 'numbers',
		'sanitize_callback' => 'roxima_sanitize_pagination_method',
	) );
	$wpc->add_control( 'pagination_method', array(
		'type'    => 'select',
		'section' => 'layout',
		'label'   => esc_html__( 'Pagination method', 'roxima' ),
		'choices' => array(
			'numbers' => esc_html_x( 'Numbered links', 'pagination method', 'roxima' ),
			'text'    => esc_html_x( '"Previous - Next" links', 'pagination method', 'roxima' ),
		),
	) );


	//
	// Header
	//
	$wpc->add_setting( 'header_tagline', array(
		'default'           => 1,
		'sanitize_callback' => 'roxima_sanitize_checkbox',
	) );
	$wpc->add_control( 'header_tagline', array(
		'type'    => 'checkbox',
		'section' => 'header',
		'label'   => esc_html__( 'Show tagline.', 'roxima' ),
	) );

	$wpc->add_setting( 'header_sticky', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_checkbox',
	) );
	$wpc->add_control( 'header_sticky', array(
		'type'    => 'checkbox',
		'section' => 'header',
		'label'   => esc_html__( 'Sticky header.', 'roxima' ),
	) );

	$wpc->add_setting( 'logo_padding_top', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_intval_or_empty',
	) );
	$wpc->add_control( 'logo_padding_top', array(
		'type'    => 'number',
		'section' => 'header',
		'label'   => esc_html__( 'Logo top padding', 'roxima' ),
	) );

	$wpc->add_setting( 'logo_padding_bottom', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_intval_or_empty',
	) );
	$wpc->add_control( 'logo_padding_bottom', array(
		'type'    => 'number',
		'section' => 'header',
		'label'   => esc_html__( 'Logo bottom padding', 'roxima' ),
	) );

	$wpc->add_setting( 'header_bg_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'header_bg_color', array(
		'section' => 'header',
		'label'   => esc_html__( 'Background color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'header_link_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'header_link_color', array(
		'section' => 'header',
		'label'   => esc_html__( 'Link color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'header_hover_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'header_hover_color', array(
		'section' => 'header',
		'label'   => esc_html__( 'Hover color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'header_subnav_bg_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'header_subnav_bg_color', array(
		'section' => 'header',
		'label'   => esc_html__( 'Sub-menu background color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'header_subnav_border_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'header_subnav_border_color', array(
		'section' => 'header',
		'label'   => esc_html__( 'Sub-menu border color', 'roxima' ),
	) ) );


	$wpc->add_setting( 'header_subnav_link_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'header_subnav_link_color', array(
		'section' => 'header',
		'label'   => esc_html__( 'Sub-menu link color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'header_subnav_hover_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'header_subnav_hover_color', array(
		'section' => 'header',
		'label'   => esc_html__( 'Sub-menu hover color', 'roxima' ),
	) ) );



	//
	// Typography
	//
	$wpc->add_setting( 'h1_size', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_intval_or_empty',
	) );
	$wpc->add_control( 'h1_size', array(
		'type'    => 'number',
		'section' => 'typography',
		'label'   => esc_html__( 'H1 size', 'roxima' ),
	) );

	$wpc->add_setting( 'h2_size', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_intval_or_empty',
	) );
	$wpc->add_control( 'h2_size', array(
		'type'    => 'number',
		'section' => 'typography',
		'label'   => esc_html__( 'H2 size', 'roxima' ),
	) );

	$wpc->add_setting( 'h3_size', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_intval_or_empty',
	) );
	$wpc->add_control( 'h3_size', array(
		'type'    => 'number',
		'section' => 'typography',
		'label'   => esc_html__( 'H3 size', 'roxima' ),
	) );

	$wpc->add_setting( 'h4_size', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_intval_or_empty',
	) );
	$wpc->add_control( 'h4_size', array(
		'type'    => 'number',
		'section' => 'typography',
		'label'   => esc_html__( 'H4 size', 'roxima' ),
	) );

	$wpc->add_setting( 'h5_size', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_intval_or_empty',
	) );
	$wpc->add_control( 'h5_size', array(
		'type'    => 'number',
		'section' => 'typography',
		'label'   => esc_html__( 'H5 size', 'roxima' ),
	) );

	$wpc->add_setting( 'h6_size', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_intval_or_empty',
	) );
	$wpc->add_control( 'h6_size', array(
		'type'    => 'number',
		'section' => 'typography',
		'label'   => esc_html__( 'H6 size', 'roxima' ),
	) );

	$wpc->add_setting( 'body_text_size', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_intval_or_empty',
	) );
	$wpc->add_control( 'body_text_size', array(
		'type'    => 'number',
		'section' => 'typography',
		'label'   => esc_html__( 'Body text size', 'roxima' ),
	) );

	$wpc->add_setting( 'widgets_title_size', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_intval_or_empty',
	) );
	$wpc->add_control( 'widgets_title_size', array(
		'type'    => 'number',
		'section' => 'typography',
		'label'   => esc_html__( 'Widgets title size', 'roxima' ),
	) );



	//
	// Global colors
	//
	$wpc->get_control( 'background_image' )->section      = 'colors';
	$wpc->get_control( 'background_repeat' )->section     = 'colors';
	$wpc->get_control( 'background_position_x' )->section = 'colors';
	$wpc->get_control( 'background_attachment' )->section = 'colors';

	$wpc->add_setting( 'primary_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'primary_color', array(
		'section' => 'colors',
		'label'   => esc_html__( 'Primary color', 'roxima' ),
		'description'   => esc_html__( 'Accent color.', 'roxima' ),
	) ) );

	$wpc->add_setting( 'site_text_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'site_text_color', array(
		'section' => 'colors',
		'label'   => esc_html__( 'Text color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'site_link_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'site_link_color', array(
		'section' => 'colors',
		'label'   => esc_html__( 'Link color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'site_hover_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'site_hover_color', array(
		'section' => 'colors',
		'label'   => esc_html__( 'Hover color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'button_bg_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'button_bg_color', array(
		'section' => 'colors',
		'label'   => esc_html__( 'Button background color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'button_text_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'button_text_color', array(
		'section' => 'colors',
		'label'   => esc_html__( 'Button text color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'button_bg_hover_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'button_bg_hover_color', array(
		'section' => 'colors',
		'label'   => esc_html__( 'Button background hover color', 'roxima' ),
	) ) );



	//
	// Sidebar colors
	//
	$wpc->add_setting( 'widgets_title_bg_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'widgets_title_bg_color', array(
		'section' => 'sidebar',
		'label'   => esc_html__( 'Widget title background color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'widgets_title_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'widgets_title_color', array(
		'section' => 'sidebar',
		'label'   => esc_html__( 'Widget title color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'widgets_text_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'widgets_text_color', array(
		'section' => 'sidebar',
		'label'   => esc_html__( 'Widget text color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'widgets_link_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'widgets_link_color', array(
		'section' => 'sidebar',
		'label'   => esc_html__( 'Widget link color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'widgets_hover_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'widgets_hover_color', array(
		'section' => 'sidebar',
		'label'   => esc_html__( 'Widget hover color', 'roxima' ),
	) ) );


	//
	// Social
	//
	$networks = roxima_get_social_networks();

	foreach ( $networks as $network ) {
		$wpc->add_setting( 'social_' . $network['name'], array(
			'default'           => '',
			'sanitize_callback' => 'esc_url_raw',
		) );
		$wpc->add_control( 'social_' . $network['name'], array(
			'type'    => 'url',
			'section' => 'social',
			'label'   => sprintf( _x( '%s URL', 'social network url', 'roxima' ), $network['label'] ),
		) );
	}

	$wpc->add_setting( 'rss_feed', array(
		'default'           => get_bloginfo( 'rss2_url' ),
		'sanitize_callback' => 'esc_url_raw',
	) );
	$wpc->add_control( 'rss_feed', array(
		'type'    => 'url',
		'section' => 'social',
		'label'   => esc_html__( 'RSS Feed', 'roxima' ),
	) );



	//
	// Single Post
	//
	$wpc->add_setting( 'single_categories', array(
		'default'           => 1,
		'sanitize_callback' => 'roxima_sanitize_checkbox',
	) );
	$wpc->add_control( 'single_categories', array(
		'type'    => 'checkbox',
		'section' => 'single_post',
		'label'   => esc_html__( 'Show categories.', 'roxima' ),
	) );

	$wpc->add_setting( 'single_date', array(
		'default'           => 1,
		'sanitize_callback' => 'roxima_sanitize_checkbox',
	) );
	$wpc->add_control( 'single_date', array(
		'type'    => 'checkbox',
		'section' => 'single_post',
		'label'   => esc_html__( 'Show date.', 'roxima' ),
	) );

	$wpc->add_setting( 'single_comments', array(
		'default'           => 1,
		'sanitize_callback' => 'roxima_sanitize_checkbox',
	) );
	$wpc->add_control( 'single_comments', array(
		'type'    => 'checkbox',
		'section' => 'single_post',
		'label'   => esc_html__( 'Show comments.', 'roxima' ),
	) );

	$wpc->add_setting( 'single_authorbox', array(
		'default'           => 1,
		'sanitize_callback' => 'roxima_sanitize_checkbox',
	) );
	$wpc->add_control( 'single_authorbox', array(
		'type'    => 'checkbox',
		'section' => 'single_post',
		'label'   => esc_html__( 'Show author box.', 'roxima' ),
	) );

	$wpc->add_setting( 'single_related', array(
		'default'           => 1,
		'sanitize_callback' => 'roxima_sanitize_checkbox',
	) );
	$wpc->add_control( 'single_related', array(
		'type'    => 'checkbox',
		'section' => 'single_post',
		'label'   => esc_html__( 'Show related posts.', 'roxima' ),
	) );

	$wpc->add_setting( 'single_related_title', array(
		'default'           => esc_html__( 'You may also like', 'roxima' ),
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wpc->add_control( 'single_related_title', array(
		'type'    => 'text',
		'section' => 'single_post',
		'label'   => esc_html__( 'Related Posts section title', 'roxima' ),
	) );



	//
	// Titles
	//
	$wpc->add_setting( 'title_blog', array(
		'default'           => esc_html__( 'from the blog.', 'roxima' ),
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wpc->add_control( 'title_blog', array(
		'type'    => 'text',
		'section' => 'single_post',
		'label'   => esc_html__( 'Blog section title', 'roxima' ),
	) );

	$wpc->add_setting( 'title_search', array(
		'default'           => esc_html__( 'search results.', 'roxima' ),
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wpc->add_control( 'title_search', array(
		'type'    => 'text',
		'section' => 'titles',
		'label'   => esc_html__( 'Search title', 'roxima' ),
	) );

	$wpc->add_setting( 'title_404', array(
		'default'           => esc_html__( 'page not found.', 'roxima' ),
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wpc->add_control( 'title_404', array(
		'type'    => 'text',
		'section' => 'titles',
		'label'   => esc_html__( '404 (not found) title', 'roxima' ),
	) );



	//
	// Other
	//
	$wpc->add_setting( 'custom_css', array(
		'default'              => '',
		'sanitize_callback'    => 'roxima_sanitize_custom_css',
		'sanitize_js_callback' => 'roxima_sanitize_custom_css',
	) );
	$wpc->add_control( 'custom_css', array(
		'type'    => 'textarea',
		'section' => 'other',
		'label'   => esc_html__( 'Custom CSS', 'roxima' ),
	) );

	$wpc->add_setting( 'google_maps_api_enable', array(
		'default'           => 1,
		'sanitize_callback' => 'roxima_sanitize_checkbox',
	) );
	$wpc->add_control( 'google_maps_api_enable', array(
		'type'        => 'checkbox',
		'section'     => 'other',
		'label'       => esc_html__( 'Enable Google Maps API.', 'roxima' ),
		'description' => esc_html__( 'The Google Maps API must only be loaded once in each page. Since many plugins may try to load it as well, you might want to disable it from the theme to avoid potential errors.', 'roxima' ),
	) );

	$wpc->add_setting( 'google_maps_api_key', array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wpc->add_control( 'google_maps_api_key', array(
		'type'        => 'text',
		'section'     => 'other',
		'label'       => esc_html__( 'Google Maps API key', 'roxima' ),
		'description' => wp_kses( sprintf( __( 'While your maps can be displayed without an API key, if you get a lot of visits to your site (more than 25,000 per day currently), the maps might stop working. In that case, you need to issue a key from <a href="%s" target="_blank">Google Accounts</a>', 'roxima' ), 'https://code.google.com/apis/console/' ), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ),
	) );

	$wpc->add_setting( 'google_anaytics_tracking_id', array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wpc->add_control( 'google_anaytics_tracking_id', array(
		'type'        => 'text',
		'section'     => 'other',
		'label'       => esc_html__( 'Google Analytics Tracking ID', 'roxima' ),
		'description' => wp_kses( sprintf( __( 'Tracking is enabled only for the non-admin portion of your website. If you need fine-grained control of the tracking code, you are strongly adviced to <a href="%s" target="_blank">use a specialty plugin</a> instead.', 'roxima' ), 'https://wordpress.org/plugins/search.php?q=analytics' ), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ),
	) );



	//
	// Footer
	//
	$wpc->add_setting( 'footer_text', array(
		'default'           => sprintf( '<a href="%s">%s</a> &ndash; %s',
			esc_attr( home_url( '/' ) ),
			get_bloginfo( 'name' ),
			get_bloginfo( 'description' )
		),
		'sanitize_callback' => 'roxima_sanitize_footer_text',
	) );
	$wpc->add_control( 'footer_text', array(
		'type'        => 'text',
		'section'     => 'footer',
		'label'       => esc_html__( 'Footer text', 'roxima' ),
		'description' => esc_html__( 'Allowed tags: a (href|class), img (src|class), span (class), i (class), b, em, strong.', 'roxima' ),
	) );

	$wpc->add_setting( 'footer_bg_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'footer_bg_color', array(
		'section' => 'footer',
		'label'   => esc_html__( 'Background color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'footer_text_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'footer_text_color', array(
		'section' => 'footer',
		'label'   => esc_html__( 'Text color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'footer_link_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'footer_link_color', array(
		'section' => 'footer',
		'label'   => esc_html__( 'Link color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'footer_hover_color', array(
		'default'           => '',
		'sanitize_callback' => 'roxima_sanitize_hex_color',
	) );
	$wpc->add_control( new WP_Customize_Color_Control( $wpc, 'footer_hover_color', array(
		'section' => 'footer',
		'label'   => esc_html__( 'Hover color', 'roxima' ),
	) ) );

	$wpc->add_setting( 'footer_socials', array(
		'default'           => 1,
		'sanitize_callback' => 'roxima_sanitize_checkbox',
	) );
	$wpc->add_control( 'footer_socials', array(
		'type'    => 'checkbox',
		'section' => 'footer',
		'label'   => esc_html__( 'Show social icons.', 'roxima' ),
	) );



	//
	// site_tagline Section
	//
	$wpc->add_setting( 'logo', array(
		'default'           => '',
		'sanitize_callback' => 'esc_url_raw',
	) );
	$wpc->add_control( new WP_Customize_Image_Control( $wpc, 'logo', array(
		'section'     => 'title_tagline',
		'label'       => esc_html__( 'Logo', 'roxima' ),
		'description' => esc_html__( 'If an image is selected, it will replace the default textual logo (site name) on the header.', 'roxima' ),
	) ) );

}
