<?php

global $moment_sections;
global $moment_settings_controls;
global $moment_repeated_settings_controls;
global $moment_customizer_defaults;
global $wp_version;

if (version_compare($wp_version, '4.4.2', '<=')) {
    /*defaults values*/
    $moment_customizer_defaults['moment-logo'] = '';
    $moment_customizer_defaults['moment-title-tagline-message'] = sprintf( __( '%s If you do not have a logo %s', 'moment' ), '<span class="customize-control-title">','</span>' );
    $moment_customizer_defaults['moment-enable-title'] = 1;
    $moment_customizer_defaults['moment-enable-tagline'] = 1;

    /*creating setting control*/
    $moment_settings_controls['moment-logo'] =
        array(
            'setting' =>     array(
                'default'              => $moment_customizer_defaults['moment-logo'],
            ),
            'control' => array(
                'label'                 =>  __( 'Logo', 'moment' ),
                'section'               => 'title_tagline',
                'type'                  => 'image',
                'priority'              => 70,
                'description'           =>  __( 'Recommended logo size 165*50', 'moment' ),
                'active_callback'       => ''
            )
        );

    /*enable option for enable tagline in header*/
    $moment_settings_controls['moment-title-tagline-message'] =
        array(
            'control' => array(
                'description'           =>  $moment_customizer_defaults['moment-title-tagline-message'],
                'section'               => 'title_tagline',
                'type'                  => 'message',
                'priority'              => 75,
                'active_callback'       => ''
            )
        );
    /*enable option for enable tagline in header*/
    $moment_settings_controls['moment-enable-title'] =
        array(
            'setting' =>     array(
                'default'              => $moment_customizer_defaults['moment-enable-title'],
            ),
            'control' => array(
                'label'                 =>  __( 'Enable Title', 'moment' ),
                'section'               => 'title_tagline',
                'type'                  => 'checkbox',
                'priority'              => 80,
                'active_callback'       => ''
            )
        );
    $moment_settings_controls['moment-enable-tagline'] =
        array(
            'setting' =>     array(
                'default'              => $moment_customizer_defaults['moment-enable-tagline'],
            ),
            'control' => array(
                'label'                 =>  __( 'Enable Tagline', 'moment' ),
                'section'               => 'title_tagline',
                'type'                  => 'checkbox',
                'priority'              => 90,
                'active_callback'       => ''
            )
        );
}
