<?php 

  function maximgym_customizer( $wp_customize ){


    $wp_customize->add_section(
      'sec_header',
      array(
        "title"=>__('Header Section','maximgym')
      )
    );

     //Email
    $wp_customize->add_setting(
      'set_header_email',
      array(
        'type'=>'theme_mod',
        'default'=>__('xyz@example.com','maximgym'),
        'sanitize_callback'=>'sanitize_email'
      )

    );


    $wp_customize->add_control(
      'set_header_email',
      array(
        'label'=>__('Header Email','maximgym'),
        'description'=>__('Please type your contact email here','maximgym'),
        'section'=>'sec_header',
        'type'=>'text'
      )
    );

     //Phone
    $wp_customize->add_setting(
      'set_header_phone',
      array(
        'type'=>'theme_mod',
        'default'=>__('1111111111','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_header_phone',
      array(
        'label'=>__('Header Phone','maximgym'),
        'description'=>__('Please add your contact number here','maximgym'),
        'section'=>'sec_header',
        'type'=>'text'
      )
    );



    $wp_customize->add_section(
      'sec_hero',
      array(
        "title"=>__('Hero Section','maximgym')
      )
    );

  //Title
    $wp_customize->add_setting(
      'set_hero_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_hero_title',
      array(
        'label'=>__('Hero Title','maximgym'),
        'description'=>__('Please type your Title here','maximgym'),
        'section'=>'sec_hero',
        'type'=>'text'
      )
    );

    //subTitle
    $wp_customize->add_setting(
      'set_hero_subtitle',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add subTitle','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_hero_subtitle',
      array(
        'label'=>__('Hero Subtitle','maximgym'),
        'description'=>__('Please type your Subtitle here','maximgym'),
        'section'=>'sec_hero',
        'type'=>'text'
      )
    );

    //button text

    $wp_customize->add_setting(
      'set_hero_button_text',
      array(
        'type'=>'theme_mod',
        'default'=>__('Read More','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_hero_button_text',
      array(
        'label'=>__('Hero Button Text','maximgym'),
        'description'=>__('Please type button text here','maximgym'),
        'section'=>'sec_hero',
        'type'=>'text'
      )
    );

    //button link
    $wp_customize->add_setting(
      'set_hero_button_link',
      array(
        'type'=>'theme_mod',
        'default'=>'#',
        'sanitize_callback'=>'esc_url_raw'
      )

    );


    $wp_customize->add_control(
      'set_hero_button_link',
      array(
        'label'=>__('Hero Button Link','maximgym'),
        'description'=>__('Please type button link here','maximgym'),
        'section'=>'sec_hero',
        'type'=>'url'
      )
    );

    //Hero Height
    $wp_customize->add_setting(
      'set_hero_height',
      array(
        'type'=>'theme_mod',
        'default'=>800,
        'sanitize_callback'=>'absint'
      )

    );


    $wp_customize->add_control(
      'set_hero_height',
      array(
        'label'=>__('Hero Height','maximgym'),
        'description'=>__('Please type hero height here','maximgym'),
        'section'=>'sec_hero',
        'type'=>'number'
      )
    );


    //Hero Background
     $wp_customize->add_setting(
      'set_hero_background',
      array(
        'type'=>'theme_mod',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_hero_background',
      array(
          'label'=>__('Hero Image','maximgym'),
          'section'=>'sec_hero'
          //'mime_type'=>'image'
        )
      )
     
    );

    /*------------CTA Section----------------*/

    $wp_customize->add_section(
      'sec_cta',
      array(
        "title"=>__('CTA Section','maximgym')
      )
    );

    //Title
    $wp_customize->add_setting(
      'set_cta_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Gym Excercise equipments','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_cta_title',
      array(
        'label'=>__('CTA Title','maximgym'),
        'description'=>__('Please type your Title here','maximgym'),
        'section'=>'sec_cta',
        'type'=>'text'
      )
    );

    //subTitle
    $wp_customize->add_setting(
      'set_cta_subtitle',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Brief Desctiption','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_cta_subtitle',
      array(
        'label'=>__('CTA Subtitle','maximgym'),
        'description'=>__('Please type your Subtitle here','maximgym'),
        'section'=>'sec_cta',
        'type'=>'text'
      )
    );

    //button text

    $wp_customize->add_setting(
      'set_cta_button_text',
      array(
        'type'=>'theme_mod',
        'default'=>__('Read More','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_cta_button_text',
      array(
        'label'=>__('CTA Button Text','maximgym'),
        'description'=>__('Please type button text here','maximgym'),
        'section'=>'sec_cta',
        'type'=>'text'
      )
    );

    //button link
    $wp_customize->add_setting(
      'set_cta_button_link',
      array(
        'type'=>'theme_mod',
        'default'=>'#',
        'sanitize_callback'=>'esc_url_raw'
      )

    );


    $wp_customize->add_control(
      'set_cta_button_link',
      array(
        'label'=> __('CTA Button Link','maximgym'),
        'description'=>__('Please type button link here','maximgym'),
        'section'=>'sec_cta',
        'type'=>'url'
      )
    );

     /*------------Services Section----------------*/

     $wp_customize->add_section(
      'sec_services',
      array(
        "title"=>__('Services Section','maximgym')
      )
    );

    //Title
    $wp_customize->add_setting(
      'set_service_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Services','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_title',
      array(
        'label'=>__('Service Title','maximgym'),
        'description'=>__('Please type your Title here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );

    //subTitle
    $wp_customize->add_setting(
      'set_service_subtitle',
      array(
        'type'=>'theme_mod',
        'default'=>__('The passage experienced a surge in popularity during the 1960s.','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_subtitle',
      array(
        'label'=>__('Service Subtitle','maximgym'),
        'description'=>__('Please type your Subtitle here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );

   


    //Service 1

    $wp_customize->add_setting(
      'set_service_first_icon',
      array(
        'type'=>'theme_mod',
        'default'=>__('<i class="bi bi-briefcase"></i>','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_first_icon',
      array(
        'label'=>__('Service Icon First','maximgym'),
        'description'=>__('Please add your service icon here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );


    $wp_customize->add_setting(
      'set_service_title_first',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_title_first',
      array(
        'label'=>__('Service Title First','maximgym'),
        'description'=>__('Please type your First service title here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );


    $wp_customize->add_setting(
      'set_service_subtitle_first',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add SubTitle','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_subtitle_first',
      array(
        'label'=>__('Service subTitle First','maximgym'),
        'description'=>__('Please type your First service subtitle here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );


     //Service 2

    $wp_customize->add_setting(
      'set_service_sec_icon',
      array(
        'type'=>'theme_mod',
        'default'=>__('<i class="bi bi-card-checklist"></i>','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_sec_icon',
      array(
        'label'=>__('Service Icon Second','maximgym'),
        'description'=>__('Please add your service icon here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );


    $wp_customize->add_setting(
      'set_service_title_sec',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_title_sec',
      array(
        'label'=>__('Service Title Second','maximgym'),
        'description'=>__('Please type your Second service title here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );


    $wp_customize->add_setting(
      'set_service_subtitle_sec',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add SubTitle','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_subtitle_sec',
      array(
        'label'=>__('Service subTitle Second','maximgym'),
        'description'=>__('Please type your Second service subtitle here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );


     //Service 3

    $wp_customize->add_setting(
      'set_service_third_icon',
      array(
        'type'=>'theme_mod',
        'default'=>__('<i class="bi bi-bar-chart"></i>','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_third_icon',
      array(
        'label'=>__('Service Icon Third','maximgym'),
        'description'=>__('Please add your service icon here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );


    $wp_customize->add_setting(
      'set_service_title_third',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_title_third',
      array(
        'label'=>__('Service Title Third','maximgym'),
        'description'=>__('Please type your Third service title here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );


    $wp_customize->add_setting(
      'set_service_subtitle_third',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add SubTitle','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_service_subtitle_third',
      array(
        'label'=>__('Service subTitle Third','maximgym'),
        'description'=>__('Please type your Third service subtitle here','maximgym'),
        'section'=>'sec_services',
        'type'=>'text'
      )
    );


     /*------------Portfolio Section----------------*/

     $wp_customize->add_section(
      'sec_portfolio',
      array(
        "title"=>__('Portfolio Section','maximgym')
      )
    );

    //Title
    $wp_customize->add_setting(
      'set_portfolio_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_portfolio_title',
      array(
        'label'=>__('Portfolio Title','maximgym'),
        'description'=>__('Please type your Title here','maximgym'),
        'section'=>'sec_portfolio',
        'type'=>'text'
      )
    );

    //subTitle
    $wp_customize->add_setting(
      'set_portfolio_subtitle',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add subTitle','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_portfolio_subtitle',
      array(
        'label'=>__('Portfolio Subtitle','maximgym'),
        'description'=>__('Please type your Subtitle here','maximgym'),
        'section'=>'sec_portfolio',
        'type'=>'text'
      )
    );

    //Portfolio First Image

    $wp_customize->add_setting(
      'set_portfolio_first_image',
      array(
        'type'=>'theme_mod',
        'default'=>get_template_directory_uri() . '/assets/img/portfolio/portfolio-1.jpg',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_portfolio_first_image',
      array(
          'label'=>__('Portfolio first Image','maximgym'),
          'section'=>'sec_portfolio'
          
        )
      )
     
    );


    $wp_customize->add_setting(
      'set_portfolio_first_image_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Image title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_portfolio_first_image_title',
      array(
        'label'=>__('Portfolio first image title','maximgym'),
        'description'=>__('Please type your image title here','maximgym'),
        'section'=>'sec_portfolio',
        'type'=>'text'
      )
    );


    //Portfolio Second Image

    $wp_customize->add_setting(
      'set_portfolio_sec_image',
      array(
        'type'=>'theme_mod',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_portfolio_sec_image',
      array(
          'label'=>__('Portfolio second Image','maximgym'),
          'section'=>'sec_portfolio'
          
        )
      )
     
    );


    $wp_customize->add_setting(
      'set_portfolio_sec_image_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Image title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_portfolio_sec_image_title',
      array(
        'label'=>__('Portfolio second image title','maximgym'),
        'description'=>__('Please type your image title here','maximgym'),
        'section'=>'sec_portfolio',
        'type'=>'text'
      )
    );

     //Portfolio Third Image

    $wp_customize->add_setting(
      'set_portfolio_third_image',
      array(
        'type'=>'theme_mod',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_portfolio_third_image',
      array(
          'label'=>__('Portfolio third Image','maximgym'),
          'section'=>'sec_portfolio'          
        )
      )
     
    );


    $wp_customize->add_setting(
      'set_portfolio_third_image_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Image title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_portfolio_third_image_title',
      array(
        'label'=>__('Portfolio third image title','maximgym'),
        'description'=>__('Please type your image title here','maximgym'),
        'section'=>'sec_portfolio',
        'type'=>'text'
      )
    );



     //Portfolio Fourth Image

    $wp_customize->add_setting(
      'set_portfolio_fourth_image',
      array(
        'type'=>'theme_mod',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_portfolio_fourth_image',
      array(
          'label'=>__('Portfolio fourth Image','maximgym'),
          'section'=>'sec_portfolio'
          
        )
      )
     
    );


    $wp_customize->add_setting(
      'set_portfolio_fourth_image_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Image title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_portfolio_fourth_image_title',
      array(
        'label'=>__('Portfolio fourth image title','maximgym'),
        'description'=>__('Please type your image title here','maximgym'),
        'section'=>'sec_portfolio',
        'type'=>'text'
      )
    );


     //Portfolio Fifth Image

    $wp_customize->add_setting(
      'set_portfolio_fifth_image',
      array(
        'type'=>'theme_mod',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_portfolio_fifth_image',
      array(
          'label'=>__('Portfolio fifth Image','maximgym'),
          'section'=>'sec_portfolio'
          
        )
      )
     
    );


    $wp_customize->add_setting(
      'set_portfolio_fifth_image_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Image title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_portfolio_fifth_image_title',
      array(
        'label'=>__('Portfolio fifth image title','maximgym'),
        'description'=>__('Please type your image title here','maximgym'),
        'section'=>'sec_portfolio',
        'type'=>'text'
      )
    );


     //Portfolio Sixth Image

    $wp_customize->add_setting(
      'set_portfolio_sixth_image',
      array(
        'type'=>'theme_mod',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_portfolio_sixth_image',
      array(
          'label'=>__('Portfolio sixth Image','maximgym'),
          'section'=>'sec_portfolio'
          
        )
      )
     
    );


    $wp_customize->add_setting(
      'set_portfolio_sixth_image_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Image title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_portfolio_sixth_image_title',
      array(
        'label'=>__('Portfolio sixth image title','maximgym'),
        'description'=>__('Please type your image title here','maximgym'),
        'section'=>'sec_portfolio',
        'type'=>'text'
      )
    );


     /*------------Our clients----------------*/

     $wp_customize->add_section(
      'sec_client',
      array(
        "title"=>__('Client Section','maximgym')
      )
    );

    //Title
    $wp_customize->add_setting(
      'set_client_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Add Title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_client_title',
      array(
        'label'=>__('Our Clients','maximgym'),
        'description'=>__('Please type your Title here','maximgym'),
        'section'=>'sec_client',
        'type'=>'text'
      )
    );

    //subTitle
    $wp_customize->add_setting(
      'set_client_subtitle',
      array(
        'type'=>'theme_mod',
        'default'=>__('It difficult to find examples of lorem ipsum in use before Letraset made it popular.','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_client_subtitle',
      array(
        'label'=>__('Client Subtitle','maximgym'),
        'description'=>__('Please type your Subtitle here','maximgym'),
        'section'=>'sec_client',
        'type'=>'text'
      )
    );


    

    

    $wp_customize->add_setting(
      'set_client_brand_first_image',
      array(
        'type'=>'theme_mod',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_client_brand_first_image',
      array(
          'label'=>__('Brand Image','maximgym'),
          'section'=>'sec_client'
          
        )
      )
     
    );

    

    $wp_customize->add_setting(
      'set_client_brand_sec_image',
      array(
        'type'=>'theme_mod',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_client_brand_sec_image',
      array(
          'label'=>__('Brand Image','maximgym'),
          'section'=>'sec_client'
          
        )
      )
     
    );

   

    $wp_customize->add_setting(
      'set_client_brand_third_image',
      array(
        'type'=>'theme_mod',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_client_brand_third_image',
      array(
          'label'=>__('Brand Image','maximgym'),
          'section'=>'sec_client'
          
        )
      )
     
    );

  
    $wp_customize->add_setting(
      'set_client_brand_fourth_image',
      array(
        'type'=>'theme_mod',
        'sanitize_callback'=>'maximgym_sanitize_image'
      )

    );


    $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize,
      'set_client_brand_fourth_image',
      array(
          'label'=>__('Brand Image','maximgym'),
          'section'=>'sec_client'
          
        )
      )
     
    );


    /*------------Footer Section----------------*/

    
    $wp_customize->add_section(
      'sec_footer',
      array(
        "title"=>__('Footer Section','maximgym')
      )
    );


    //Company Logo title
    $wp_customize->add_setting(
      'set_footer_company_logo_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Logo Title','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_footer_company_logo_title',
      array(
        'label'=>__('Company Logo Title','maximgym'),
        'description'=>__('Please add company logo title here','maximgym'),
        'section'=>'sec_footer',
        'type'=>'text'
      )
    );


    //Contact Address
    $wp_customize->add_setting(
      'set_footer_address_line',
      array(
        'type'=>'theme_mod',
        'default'=>__('A108 Adam Street','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_footer_address_line',
      array(
        'label'=>__('Address','maximgym'),
        'description'=>__('Please add address line here','maximgym'),
        'section'=>'sec_footer',
        'type'=>'text'
      )
    );

    //Contact city
    $wp_customize->add_setting(
      'set_footer_address_city',
      array(
        'type'=>'theme_mod',
        'default'=>__('New York','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_footer_address_city',
      array(
        'label'=>__('City','maximgym'),
        'description'=>__('Please add city here','maximgym'),
        'section'=>'sec_footer',
        'type'=>'text'
      )
    );

    //Contact state
    $wp_customize->add_setting(
      'set_footer_address_state',
      array(
        'type'=>'theme_mod',
        'default'=>__('NY','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_footer_address_state',
      array(
        'label'=>__('State','maximgym'),
        'description'=>__('Please add state here','maximgym'),
        'section'=>'sec_footer',
        'type'=>'text'
      )
    );


    //Contact country
    $wp_customize->add_setting(
      'set_footer_address_country',
      array(
        'type'=>'theme_mod',
        'default'=>__('United States','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_footer_address_country',
      array(
        'label'=>__('Country','maximgym'),
        'description'=>__('Please add country here','maximgym'),
        'section'=>'sec_footer',
        'type'=>'text'
      )
    );


    //Contact postal code
    $wp_customize->add_setting(
      'set_footer_postalcode',
      array(
        'type'=>'theme_mod',
        'default'=>__('111111','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_footer_postalcode',
      array(
        'label'=>__('Postal code','maximgym'),
        'description'=>__('Please add postal code here','maximgym'),
        'section'=>'sec_footer',
        'type'=>'text'
      )
    );


    //Contact phone
    $wp_customize->add_setting(
      'set_footer_phone',
      array(
        'type'=>'theme_mod',
        'default'=>__('1111111111','maximgym'),
        'sanitize_callback'=>'absint'
      )

    );


    $wp_customize->add_control(
      'set_footer_phone',
      array(
        'label'=>__('Phone number','maximgym'),
        'description'=>__('Please add phone number here','maximgym'),
        'section'=>'sec_footer',
        'type'=>'text'
      )
    );


    //Contact email
    $wp_customize->add_setting(
      'set_footer_email',
      array(
        'type'=>'theme_mod',
        'default'=>__('abc@example.com','maximgym'),
        'sanitize_callback'=>'sanitize_email'
      )

    );


    $wp_customize->add_control(
      'set_footer_email',
      array(
        'label'=>__('Email','maximgym'),
        'description'=>__('Please add email address here','maximgym'),
        'section'=>'sec_footer',
        'type'=>'text'
      )
    );

       

    //Newsletter title
    $wp_customize->add_setting(
      'set_footer_newsletter_title',
      array(
        'type'=>'theme_mod',
        'default'=>__('Join Our Newsletter','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_footer_newsletter_title',
      array(
        'label'=>__('Newsletter Title','maximgym'),
        'description'=>__('Please add newsletter title here','maximgym'),
        'section'=>'sec_footer',
        'type'=>'text'
      )
    );


    //Newsletter subtitle
    $wp_customize->add_setting(
      'set_footer_newsletter_subtitle',
      array(
        'type'=>'theme_mod',
        'default'=>__('Loreum ipsum','maximgym'),
        'sanitize_callback'=>'sanitize_text_field'
      )

    );


    $wp_customize->add_control(
      'set_footer_newsletter_subtitle',
      array(
        'label'=>__('Newsletter subTitle','maximgym'),
        'description'=>__('Please add newsletter subtitle here','maximgym'),
        'section'=>'sec_footer',
        'type'=>'text'
      )
    );

  
    $wp_customize->add_setting( 'twitter', array( 'default' => '' ,'sanitize_callback' => 'esc_url_raw') );
    $wp_customize->add_setting( 'instagram', array( 'default' => '' ,'sanitize_callback' => 'esc_url_raw') );
    $wp_customize->add_setting( 'facebook', array( 'default' => '','sanitize_callback' => 'esc_url_raw') );
    $wp_customize->add_setting( 'skype', array( 'default' => '' ,'sanitize_callback' => 'esc_url_raw' ) );
    $wp_customize->add_setting( 'linkedin', array( 'default' => '' ,'sanitize_callback' => 'esc_url_raw') );
    

    //Sections
        $wp_customize->add_section(
            'social-media',
            array(
                'title' => __( 'Social Media', 'maximgym' ),
                'priority' => 30,
                'description' => __( 'Enter the URL to your accounts for each social media for the icon to appear in the header.', 'maximgym' )
            )
        );

        //Controls
        //Twitter
        $wp_customize->add_control(
            new WP_Customize_Control(
                $wp_customize, 'twitter',
                array(
                    'label' => __( 'Twitter', 'maximgym' ),
                    'section' => 'social-media',
                    'settings' => 'twitter'
                )
            )
        );
        //Instragram
        $wp_customize->add_control(
            new WP_Customize_Control(
                $wp_customize, 'instagram',
                array(
                    'label' => __( 'Instagram', 'maximgym' ),
                    'section' => 'social-media',
                    'settings' => 'instagram'
                )
            )
        );
        //Facebook
        $wp_customize->add_control(
            new WP_Customize_Control(
                $wp_customize, 'facebook',
                array(
                    'label' => __( 'Facebook', 'maximgym' ),
                    'section' => 'social-media',
                    'settings' => 'facebook'
                )
            )
        );
        //Skype
        $wp_customize->add_control(
            new WP_Customize_Control(
                $wp_customize, 'skype',
                array(
                    'label' => __( 'Skype', 'maximgym' ),
                    'section' => 'social-media',
                    'settings' => 'skype'
                )
            )
        );
        //Linkedin
        $wp_customize->add_control(
            new WP_Customize_Control(
                $wp_customize, 'linkedin',
                array(
                    'label' => __( 'Linkedin', 'maximgym' ),
                    'section' => 'social-media',
                    'settings' => 'linkedin'
                )
            )
        );

  }

  add_action( 'customize_register', 'maximgym_customizer' );

  if(!function_exists('maximgym_sanitize_image')){
     function maximgym_sanitize_image( $file, $setting ) {
        //allowed file types
        $mimes = array(
            'jpg|jpeg|jpe' => 'image/jpeg',
            'gif'          => 'image/gif',
            'png'          => 'image/png'
        );
          
        //check file type from file name
        $file_ext = wp_check_filetype( $file, $mimes );
          
        //if file has a valid mime type return it, otherwise return default
        return ( $file_ext['ext'] ? $file : $setting->default );
    }
  }

?>
