Example #1
0
function reset_options_data()
{
    if (!wp_verify_nonce($_POST['creative_nonce'], 'creative_nonce')) {
        exit;
    }
    $wl_theme_options = creative_general_options();
    // Handle request then generate response using WP_Ajax_Response
    if ($_POST['option'] == "creative_general_options1") {
        $wl_theme_options['front_page_enabled'] = 'on';
        $wl_theme_options['upload_image_logo'] = null;
        $wl_theme_options['height'] = 60;
        $wl_theme_options['width'] = 150;
        $wl_theme_options['upload_image_favicon'] = null;
        $wl_theme_options['custom_css'] = null;
        update_option('creative_general_options', $wl_theme_options);
    }
    if ($_POST['option'] == "creative_slideshow_options") {
        $ImageUrl1 = get_template_directory_uri() . "/img/slider/1.jpg";
        $ImageUrl2 = get_template_directory_uri() . "/img/slider/2.jpg";
        $ImageUrl3 = get_template_directory_uri() . "/img/slider/3.jpg";
        $wl_theme_options['home_slider_enabled'] = 'on';
        $wl_theme_options['slider_image_1'] = $ImageUrl1;
        $wl_theme_options['slider_title_1'] = __('Aldus PageMaker', 'creative');
        $wl_theme_options['slider_description_1'] = __('Lorem Ipsum is simply dummy text of the printing', 'creative');
        $wl_theme_options['slider_button_text_1'] = __('Read More', 'creative');
        $wl_theme_options['slider_button_link_1'] = '#';
        $wl_theme_options['slider_button_target_1'] = 'off';
        $wl_theme_options['slider_image_2'] = $ImageUrl2;
        $wl_theme_options['slider_title_2'] = __('variations of passages', 'creative');
        $wl_theme_options['slider_description_2'] = __('Contrary to popular belief, Lorem Ipsum is not simply random text', 'creative');
        $wl_theme_options['slider_button_text_2'] = __('Read More', 'creative');
        $wl_theme_options['slider_button_link_2'] = '#';
        $wl_theme_options['slider_button_target_2'] = 'off';
        $wl_theme_options['slider_image_3'] = $ImageUrl3;
        $wl_theme_options['slider_title_3'] = __('Contrary to popular', 'creative');
        $wl_theme_options['slider_description_3'] = __('Aldus PageMaker including versions of Lorem Ipsum, rutrum turpi', 'creative');
        $wl_theme_options['slider_button_text_3'] = __('Read More', 'creative');
        $wl_theme_options['slider_button_link_3'] = '#';
        $wl_theme_options['slider_button_target_3'] = 'off';
        update_option('creative_general_options', $wl_theme_options);
    }
    if ($_POST['option'] == "creative_service_options") {
        $wl_theme_options['home_service_enabled'] = 'on';
        $wl_theme_options['home_service_title'] = __('Services We Provide', 'creative');
        $wl_theme_options['home_service_description'] = __('Lorem Ipsum is simply dummy text of the printing', 'creative');
        $wl_theme_options['service_icon_1'] = 'fa fa-cloud-download';
        $wl_theme_options['service_title_1'] = __('Idea', 'creative');
        $wl_theme_options['service_description_1'] = __('There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in.', 'creative');
        $wl_theme_options['service_link_1'] = '#';
        $wl_theme_options['service_target_1'] = 'off';
        $wl_theme_options['service_icon_2'] = 'fa fa-bullhorn';
        $wl_theme_options['service_title_2'] = __('Records', 'creative');
        $wl_theme_options['service_description_2'] = __('There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in.', 'creative');
        $wl_theme_options['service_link_2'] = '#';
        $wl_theme_options['service_target_2'] = 'off';
        $wl_theme_options['service_icon_3'] = 'fa fa-user';
        $wl_theme_options['service_title_3'] = __('WordPress', 'creative');
        $wl_theme_options['service_description_3'] = __('There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in.', 'creative');
        $wl_theme_options['service_link_3'] = '#';
        $wl_theme_options['service_target_3'] = 'off';
        update_option('creative_general_options', $wl_theme_options);
    }
    if ($_POST['option'] == "creative_portfolio_options") {
        $ImageUrl4 = get_template_directory_uri() . "/img/portfolio/01.jpg";
        $ImageUrl5 = get_template_directory_uri() . "/img/portfolio/02.jpg";
        $ImageUrl6 = get_template_directory_uri() . "/img/portfolio/03.jpg";
        $wl_theme_options['home_port_enabled'] = 'on';
        $wl_theme_options['home_port_title'] = __('creative Portfolio Showcasse', 'creative');
        $wl_theme_options['home_port_description'] = __('creative provides you to show your portfolio contents in beautiful layout. Make a cool and colorful showcase for your site...', 'creative');
        $wl_theme_options['port_image_1'] = $ImageUrl4;
        $wl_theme_options['port_title_1'] = __('Create', 'creative');
        $wl_theme_options['port_tagline_1'] = __('Smart', 'creative');
        $wl_theme_options['port_description_1'] = __('Lorem Ipsum is simply dummy text of the printing and typesetting industry.', 'creative');
        $wl_theme_options['port_link_1'] = '#';
        $wl_theme_options['port_link_target_1'] = 'off';
        $wl_theme_options['port_image_2'] = $ImageUrl5;
        $wl_theme_options['port_title_2'] = __('Content', 'creative');
        $wl_theme_options['port_tagline_2'] = __('More', 'creative');
        $wl_theme_options['port_description_2'] = __('Lorem Ipsum is simply dummy text of the printing and typesetting industry.', 'creative');
        $wl_theme_options['port_link_2'] = '#';
        $wl_theme_options['port_link_target_2'] = 'off';
        $wl_theme_options['port_image_3'] = $ImageUrl6;
        $wl_theme_options['port_title_3'] = __('Dictionary', 'creative');
        $wl_theme_options['port_tagline_3'] = __('Wins', 'creative');
        $wl_theme_options['port_description_3'] = __('Lorem Ipsum is simply dummy text of the printing and typesetting industry.', 'creative');
        $wl_theme_options['port_link_3'] = '#';
        $wl_theme_options['port_link_target_3'] = 'off';
        update_option('creative_general_options', $wl_theme_options);
    }
    if ($_POST['option'] == "creative_blog_options") {
        $wl_theme_options['home_blog_enabled'] = 'on';
        $wl_theme_options['home_blog_title'] = __('Latest Posts', 'creative');
        $wl_theme_options['home_blog_description'] = __('We regularly post updates on our blog. Feel free to join with our blog!', 'creative');
        update_option('creative_general_options', $wl_theme_options);
    }
    if ($_POST['option'] == "creative_footercallout_options") {
        $wl_theme_options['home_call_out_enabled'] = 'on';
        $wl_theme_options['footer_call_out_title'] = __('Found a reason to work with me? Lets start!', 'creative');
        $wl_theme_options['footer_call_out_button_text'] = __('Buy Now', 'creative');
        $wl_theme_options['footer_call_out_button_link'] = '#';
        $wl_theme_options['footer_call_out_button_target'] = 'off';
        update_option('creative_general_options', $wl_theme_options);
    }
    if ($_POST['option'] == "creative_social_options") {
        $wl_theme_options['header_social_media_enabled'] = 'on';
        $wl_theme_options['footer_social_media_enabled'] = 'on';
        $wl_theme_options['header_contact_enabled'] = 'on';
        $wl_theme_options['facebook_link'] = '#';
        $wl_theme_options['twitter_link'] = '#';
        $wl_theme_options['dribbble_link'] = '#';
        $wl_theme_options['linkedin_link'] = '#';
        $wl_theme_options['rss_link'] = '#';
        $wl_theme_options['youtube_link'] = '#';
        $wl_theme_options['instagram_link'] = '#';
        $wl_theme_options['googleplus_link'] = '#';
        $wl_theme_options['email_id'] = __('*****@*****.**', 'creative');
        $wl_theme_options['phone_no'] = __('8801111111', 'creative');
        update_option('creative_general_options', $wl_theme_options);
    }
    if ($_POST['option'] == "creative_footer_options") {
        $wl_theme_options['home_footer_enabled'] = 'on';
        $wl_theme_options['footer_customizations'] = __('© 2014 Weblizar Theme', 'creative');
        $wl_theme_options['developed_by_text'] = __('Theme Developed By', 'creative');
        $wl_theme_options['developed_by_creative_text'] = __('Weblizar Themes', 'creative');
        $wl_theme_options['developed_by_link'] = __('http://www.weblizar.com/', 'creative');
        update_option('creative_general_options', $wl_theme_options);
    }
    if (isset($_POST['option']) && $_POST['option'] == "restoreall") {
        delete_option('creative_general_options');
    }
}
Example #2
0
<!-- Portfolio Work -->
<?php 
$wl_theme_options = creative_general_options();
if ($wl_theme_options['home_port_enabled'] == 'on') {
    ?>
<div class="bottom-pad margin-top100">
    <div class="container">
        <div class="row">
            <div class="portfolio-content">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"><?php 
    if ($wl_theme_options['home_port_title'] != "" || $wl_theme_options['home_port_description'] != "") {
        ?>
                    <div class="portfolio-title text-center">
                        <h2 class="wow bounceIn"><?php 
        echo esc_attr($wl_theme_options['home_port_title']);
        ?>
</h2>
                        <h4 class="wow fadeInRight"><?php 
        echo esc_attr($wl_theme_options['home_port_description']);
        ?>
 </h4>
                    </div>
					<?php 
    }
    ?>
                </div>
                <div class="col-md-12 col-sm-12 col-xs-12 portfolio-three-column wow bounceIn">
                    <div class="grid">
						<!-- Item 1 -->
						<?php 
    for ($i = 1; $i <= 3; $i++) {
Example #3
0
function creative_customizer($wp_customize)
{
    wp_enqueue_style('creative-customizr', get_template_directory_uri() . '/css/customizr.css');
    $ImageUrl4 = get_template_directory_uri() . "/img/portfolio/01.jpg";
    $ImageUrl5 = get_template_directory_uri() . "/img/portfolio/02.jpg";
    $ImageUrl6 = get_template_directory_uri() . "/img/portfolio/03.jpg";
    /* Genral section */
    $wp_customize->add_panel('creative_theme_option', array('title' => __('Creative Options', 'creative'), 'priority' => 160));
    $wp_customize->add_section('general_sec', array('title' => __('Theme General Options', 'creative'), 'description' => __('Here you can customize Your theme\'s general Settings', 'creative'), 'panel' => 'creative_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35));
    $wl_theme_options = creative_general_options();
    $wp_customize->add_setting('slider_option', array('default' => $wl_theme_options['plugin_slider'], 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control(new Creative_desc_Control($wp_customize, 'creative_desc', array('label' => __('Choose Slider', 'creative'), 'section' => 'general_sec', 'settings' => 'slider_option', 'priority' => 1)));
    $wp_customize->add_setting('creative_general_options[plugin_slider]', array('type' => 'option', 'default' => $wl_theme_options['plugin_slider'], 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('creative_show_slider', array('type' => 'checkbox', 'label' => 'Ultimate Responsive Image Slider', 'section' => 'general_sec', 'settings' => 'creative_general_options[plugin_slider]'));
    $wp_customize->add_setting('creative_general_options[upload_image_logo]', array('type' => 'option', 'default' => $wl_theme_options['upload_image_logo'], 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('creative_general_options[height]', array('type' => 'option', 'default' => $wl_theme_options['height'], 'sanitize_callback' => 'creative_sanitize_integer', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('creative_general_options[width]', array('type' => 'option', 'default' => $wl_theme_options['width'], 'sanitize_callback' => 'creative_sanitize_integer', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'creative_upload_image_logo', array('label' => __('Website Logo', 'creative'), 'section' => 'general_sec', 'settings' => 'creative_general_options[upload_image_logo]')));
    $wp_customize->add_control('creative_logo_height', array('label' => __('Logo Height', 'creative'), 'type' => 'number', 'section' => 'general_sec', 'settings' => 'creative_general_options[height]'));
    $wp_customize->add_control('creative_logo_width', array('label' => __('Logo Width', 'creative'), 'type' => 'number', 'section' => 'general_sec', 'settings' => 'creative_general_options[width]'));
    $wp_customize->add_setting('creative_general_options[upload_image_favicon]', array('type' => 'option', 'default' => $wl_theme_options['upload_image_favicon'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'creative_upload_favicon_image', array('label' => __('Custom favicon', 'creative'), 'section' => 'general_sec', 'settings' => 'creative_general_options[upload_image_favicon]')));
    /* Typography  & Google Font Section */
    $wp_customize->add_section('font_sec', array('title' => __('Typography Section', 'creative'), 'panel' => 'creative_theme_option', 'description' => __('Here you can manage your theme Font Style', 'creative'), 'capability' => 'edit_theme_options', 'priority' => 35));
    $wp_customize->add_setting('creative_general_options[logo_font]', array('default' => esc_attr($wl_theme_options['logo_font']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control(new creative_Font_Control($wp_customize, 'logo_font', array('label' => __('Header Font Style', 'creative'), 'extra' => __('Logo & Tagline Font Family', 'creative'), 'section' => 'font_sec', 'settings' => 'creative_general_options[logo_font]')));
    $wp_customize->add_setting('creative_general_options[header_menu_font]', array('default' => esc_attr($wl_theme_options['header_menu_font']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control(new creative_Font_Control($wp_customize, 'header_menu_font', array('label' => __('Header Menu Font', 'creative'), 'extra' => __('Header Menu Font Family', 'creative'), 'section' => 'font_sec', 'settings' => 'creative_general_options[header_menu_font]')));
    $wp_customize->add_setting('creative_general_options[themes_title]', array('default' => esc_attr($wl_theme_options['themes_title']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control(new creative_Font_Control($wp_customize, 'themes_title', array('label' => __('Theme Heading Title', 'creative'), 'extra' => __('Change Theme Title Font Family', 'creative'), 'section' => 'font_sec', 'settings' => 'creative_general_options[themes_title]')));
    $wp_customize->add_setting('creative_general_options[theme_descrp_font]', array('default' => esc_attr($wl_theme_options['theme_descrp_font']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control(new creative_Font_Control($wp_customize, 'theme_descrp_font', array('label' => __('Font Family For Theme', 'creative'), 'extra' => __('', 'creative'), 'section' => 'font_sec', 'settings' => 'creative_general_options[theme_descrp_font]')));
    /* Portfolio Section */
    $wp_customize->add_section('portfolio_section', array('title' => __('Portfolio Options', 'creative'), 'description' => __('Here you can add Portfolio title,description and even portfolios', 'creative'), 'panel' => 'creative_theme_option', 'capability' => 'edit_theme_options', 'priority' => 36, 'active_callback' => 'is_front_page'));
    $wp_customize->add_setting('creative_general_options[home_port_enabled]', array('type' => 'option', 'default' => $wl_theme_options['home_port_enabled'], 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('creative_general_options[home_port_title]', array('type' => 'option', 'default' => $wl_theme_options['home_port_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
    $wp_customize->add_setting('creative_general_options[home_port_description]', array('type' => 'option', 'default' => $wl_theme_options['home_port_description'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
    for ($i = 1; $i <= 3; $i++) {
        $wp_customize->add_setting('creative_general_options[port_image_' . $i . ']', array('type' => 'option', 'default' => $wl_theme_options['port_image_' . $i], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
        $wp_customize->add_setting('creative_general_options[port_title_' . $i . ']', array('type' => 'option', 'default' => $wl_theme_options['port_title_' . $i], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
        $wp_customize->add_setting('creative_general_options[port_tagline_' . $i . ']', array('type' => 'option', 'default' => $wl_theme_options['port_tagline_' . $i], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
        $wp_customize->add_setting('creative_general_options[port_description_' . $i . ']', array('type' => 'option', 'default' => $wl_theme_options['port_description_' . $i], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
        $wp_customize->add_setting('creative_general_options[port_link_' . $i . ']', array('type' => 'option', 'default' => $wl_theme_options['port_link_' . $i], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
        $wp_customize->add_setting('creative_general_options[port_link_target_' . $i . ']', array('type' => 'option', 'default' => $wl_theme_options['port_link_target_' . $i], 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    }
    $wp_customize->add_control('creative_show_portfolio', array('label' => __('Enable Portfolio on Home', 'creative'), 'type' => 'checkbox', 'section' => 'portfolio_section', 'settings' => 'creative_general_options[home_port_enabled]'));
    $wp_customize->add_control('creative_portfolio_title', array('label' => __('Portfolio Heading', 'creative'), 'type' => 'text', 'section' => 'portfolio_section', 'settings' => 'creative_general_options[home_port_title]'));
    $wp_customize->add_control('creative_portfolio_description', array('label' => __('Portfolio Description', 'creative'), 'type' => 'textarea', 'section' => 'portfolio_section', 'settings' => 'creative_general_options[home_port_description]'));
    for ($i = 1; $i <= 3; $i++) {
        $j = array('', ' One', ' Two', ' Three');
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'creative_portfolio_img_' . $i, array('label' => __('Portfolio Image', 'creative') . $j[$i], 'section' => 'portfolio_section', 'settings' => 'creative_general_options[port_image_' . $i . ']')));
        $wp_customize->add_control('creative_portfolio_title_' . $i, array('label' => __('Portfolio Title', 'creative') . $j[$i], 'type' => 'text', 'section' => 'portfolio_section', 'settings' => 'creative_general_options[port_title_' . $i . ']'));
        $wp_customize->add_control('creative_portfolio_text_' . $i, array('label' => __('Portfolio Text', 'creative') . $j[$i], 'type' => 'text', 'section' => 'portfolio_section', 'settings' => 'creative_general_options[port_tagline_' . $i . ']'));
        $wp_customize->add_control('creative_portfolio_description_' . $i, array('label' => __('Portfolio Description', 'creative') . $j[$i], 'type' => 'textarea', 'section' => 'portfolio_section', 'settings' => 'creative_general_options[port_description_' . $i . ']'));
        $wp_customize->add_control('creative_port_link_' . $i, array('label' => __('Portfolio Link', 'creative') . $j[$i], 'type' => 'url', 'section' => 'portfolio_section', 'settings' => 'creative_general_options[port_link_' . $i . ']'));
        $wp_customize->add_control('creative_portfolio_target_' . $i, array('label' => __('Portfolio link open in new tab', 'creative'), 'type' => 'checkbox', 'section' => 'portfolio_section', 'settings' => 'creative_general_options[port_link_target_' . $i . ']'));
    }
    /* Blog Option */
    $wp_customize->add_section('blog_section', array('title' => __('Home Blog Options', 'creative'), 'panel' => 'creative_theme_option', 'capability' => 'edit_theme_options', 'priority' => 37));
    $wp_customize->add_setting('creative_general_options[home_blog_enabled]', array('type' => 'option', 'default' => $wl_theme_options['home_blog_enabled'], 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('creative_blog_enabled', array('label' => __('Enable Home Blog', 'creative'), 'type' => 'checkbox', 'section' => 'blog_section', 'settings' => 'creative_general_options[home_blog_enabled]'));
    $wp_customize->add_setting('creative_general_options[home_blog_title]', array('default' => esc_attr($wl_theme_options['home_blog_title']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('creative_blog_title', array('label' => __('Home Blog Title', 'creative'), 'type' => 'text', 'section' => 'blog_section', 'settings' => 'creative_general_options[home_blog_title]'));
    $wp_customize->add_setting('creative_general_options[home_blog_description]', array('default' => esc_attr($wl_theme_options['home_blog_description']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('creative_blog_desc', array('label' => __('Home Blog Description', 'creative'), 'type' => 'textarea', 'section' => 'blog_section', 'settings' => 'creative_general_options[home_blog_description]'));
    /* Service Section */
    $wp_customize->add_section('service_section', array('title' => __("Service Options", "creative"), 'panel' => 'creative_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35, 'active_callback' => 'is_front_page'));
    $wp_customize->add_setting('creative_general_options[home_service_enabled]', array('type' => 'option', 'default' => $wl_theme_options['home_service_enabled'], 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('creative_general_options[home_service_title]', array('default' => esc_attr($wl_theme_options['home_service_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
    $wp_customize->add_setting('creative_general_options[home_service_description]', array('default' => esc_attr($wl_theme_options['home_service_description']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
    $wp_customize->add_control('creative_service_enabled', array('label' => __('Enable Home Service', 'creative'), 'type' => 'checkbox', 'section' => 'service_section', 'settings' => 'creative_general_options[home_service_enabled]'));
    $wp_customize->add_control('creative_service_title', array('label' => __('Service Title', 'creative'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'creative_general_options[home_service_title]'));
    $wp_customize->add_control('creative_service_description', array('label' => __('Service Description', 'creative'), 'type' => 'textarea', 'section' => 'service_section', 'settings' => 'creative_general_options[home_service_description]'));
    for ($i = 1; $i <= 3; $i++) {
        $wp_customize->add_setting('creative_general_options[service_icon_' . $i . ']', array('default' => esc_attr($wl_theme_options['service_icon_' . $i]), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
        $wp_customize->add_setting('creative_general_options[service_title_' . $i . ']', array('default' => esc_attr($wl_theme_options['service_title_' . $i]), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
        $wp_customize->add_setting('creative_general_options[service_description_' . $i . ']', array('default' => esc_attr($wl_theme_options['service_description_' . $i]), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
        $wp_customize->add_setting('creative_general_options[service_link_' . $i . ']', array('type' => 'option', 'default' => $wl_theme_options['service_link_' . $i], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
        $wp_customize->add_setting('creative_general_options[service_target_' . $i . ']', array('type' => 'option', 'default' => $wl_theme_options['service_target_' . $i], 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    }
    for ($i = 1; $i <= 3; $i++) {
        $j = array('', ' One', ' Two', ' Three');
        $wp_customize->add_control(new creative_Customize_Misc_Control($wp_customize, 'creative_general_options1-line', array('section' => 'service_section', 'type' => 'line')));
        $wp_customize->add_control('creative_service_icon' . $i, array('label' => __('Service Icon', 'creative') . $j[$i], 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'creative'), 'section' => 'service_section', 'settings' => 'creative_general_options[service_icon_' . $i . ']'));
        $wp_customize->add_control('creative_service_title' . $i, array('label' => __('Service Title', 'creative') . $j[$i], 'type' => 'text', 'section' => 'service_section', 'settings' => 'creative_general_options[service_title_' . $i . ']'));
        $wp_customize->add_control('creative_service_description_' . $i, array('label' => __('Service Description', 'creative') . $j[$i], 'type' => 'textarea', 'section' => 'service_section', 'settings' => 'creative_general_options[service_description_' . $i . ']'));
        $wp_customize->add_control('creative_service_link_' . $i, array('label' => __('Service Link', 'creative') . $j[$i], 'type' => 'url', 'section' => 'service_section', 'settings' => 'creative_general_options[service_link_' . $i . ']'));
        $wp_customize->add_control('creative_service_link_target_' . $i, array('label' => __('Open link in new tab', 'creative'), 'type' => 'checkbox', 'section' => 'service_section', 'settings' => 'creative_general_options[service_target_' . $i . ']'));
    }
    /* Social options */
    $wp_customize->add_section('social_section', array('title' => __("Social Options", "creative"), 'panel' => 'creative_theme_option', 'capability' => 'edit_theme_options', 'priority' => 41));
    $wp_customize->add_setting('creative_general_options[header_social_media_enabled]', array('default' => esc_attr($wl_theme_options['header_social_media_enabled']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('header_social_media_enabled', array('label' => __('Enable Social Media Icons in Header', 'creative'), 'type' => 'checkbox', 'section' => 'social_section', 'settings' => 'creative_general_options[header_social_media_enabled]'));
    $wp_customize->add_setting('creative_general_options[footer_social_media_enabled]', array('default' => esc_attr($wl_theme_options['footer_social_media_enabled']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('footer_social_media_enabled', array('label' => __('Enable Social Media Icons in Footer', 'creative'), 'type' => 'checkbox', 'section' => 'social_section', 'settings' => 'creative_general_options[footer_social_media_enabled]'));
    $wp_customize->add_setting('creative_general_options[header_contact_enabled]', array('default' => esc_attr($wl_theme_options['header_contact_enabled']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('header_contact_enabled', array('label' => __('Enable Header Contact', 'creative'), 'type' => 'checkbox', 'section' => 'social_section', 'settings' => 'creative_general_options[header_contact_enabled]'));
    $wp_customize->add_setting('creative_general_options[facebook_link]', array('default' => esc_attr($wl_theme_options['facebook_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('facebook_link', array('label' => __('Facebook URL', 'creative'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'creative_general_options[facebook_link]'));
    $wp_customize->add_setting('creative_general_options[twitter_link]', array('default' => esc_attr($wl_theme_options['twitter_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('twitter_link', array('label' => __('Twitter URL', 'creative'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'creative_general_options[twitter_link]'));
    $wp_customize->add_setting('creative_general_options[dribbble_link]', array('default' => esc_attr($wl_theme_options['dribbble_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('dribbble_link', array('label' => __('Dribbble URL', 'creative'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'creative_general_options[dribbble_link]'));
    $wp_customize->add_setting('creative_general_options[linkedin_link]', array('default' => esc_attr($wl_theme_options['linkedin_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('linkedin_link', array('label' => __('LinkedIn URL', 'creative'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'creative_general_options[linkedin_link]'));
    $wp_customize->add_setting('creative_general_options[rss_link]', array('default' => esc_attr($wl_theme_options['rss_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('rss_link', array('label' => __('RSS URL', 'creative'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'creative_general_options[rss_link]'));
    $wp_customize->add_setting('creative_general_options[youtube_link]', array('default' => esc_attr($wl_theme_options['youtube_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('youtube_link', array('label' => __('Youtube URL', 'creative'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'creative_general_options[youtube_link]'));
    $wp_customize->add_setting('creative_general_options[instagram_link]', array('default' => esc_attr($wl_theme_options['instagram_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('instagram_link', array('label' => __('Instagram URL', 'creative'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'creative_general_options[instagram_link]'));
    $wp_customize->add_setting('creative_general_options[googleplus_link]', array('default' => esc_attr($wl_theme_options['googleplus_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('googleplus_link', array('label' => __('Goole+ URL', 'creative'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'creative_general_options[googleplus_link]'));
    $wp_customize->add_setting('creative_general_options[email_id]', array('default' => esc_attr($wl_theme_options['email_id']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'is_email'));
    $wp_customize->add_control('email_id', array('label' => __('Email-ID', 'creative'), 'type' => 'email', 'section' => 'social_section', 'settings' => 'creative_general_options[email_id]'));
    $wp_customize->add_setting('creative_general_options[phone_no]', array('default' => esc_attr($wl_theme_options['phone_no']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
    $wp_customize->add_control('phone_no', array('label' => __('Phone Number', 'creative'), 'type' => 'text', 'section' => 'social_section', 'sanitize_callback' => 'creative_sanitize_text', 'settings' => 'creative_general_options[phone_no]'));
    /* Footer Callout */
    $wp_customize->add_section('callout_section', array('title' => __("Footer Call-Out Options", "creative"), 'panel' => 'creative_theme_option', 'capability' => 'edit_theme_options', 'priority' => 39));
    $wp_customize->add_setting('creative_general_options[home_call_out_enabled]', array('default' => esc_attr($wl_theme_options['home_call_out_enabled']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('home_call_out_enabled', array('label' => __('Enable Footer Call-Out in Home', 'creative'), 'type' => 'checkbox', 'section' => 'callout_section', 'settings' => 'creative_general_options[home_call_out_enabled]'));
    $wp_customize->add_setting('creative_general_options[footer_call_out_title]', array('default' => esc_attr($wl_theme_options['footer_call_out_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'creative_sanitize_text'));
    $wp_customize->add_control('callout_title', array('label' => __('Call-Out Title', 'creative'), 'type' => 'text', 'section' => 'callout_section', 'settings' => 'creative_general_options[footer_call_out_title]'));
    $wp_customize->add_setting('creative_general_options[footer_call_out_button_text]', array('default' => esc_attr($wl_theme_options['footer_call_out_button_text']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('callout_btn_text', array('label' => __('Callout Button Text', 'creative'), 'type' => 'text', 'section' => 'callout_section', 'settings' => 'creative_general_options[footer_call_out_button_text]'));
    $wp_customize->add_setting('creative_general_options[footer_call_out_button_link]', array('default' => esc_attr($wl_theme_options['footer_call_out_button_link']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control('callout_btn_link', array('label' => __('Call-Out Button Link', 'creative'), 'type' => 'url', 'section' => 'callout_section', 'settings' => 'creative_general_options[footer_call_out_button_link]'));
    $wp_customize->add_setting('creative_general_options[footer_call_out_button_target]', array('default' => esc_attr($wl_theme_options['footer_call_out_button_target']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('footer_call_out_button_target', array('label' => __('Open Link into new tab', 'creative'), 'type' => 'checkbox', 'section' => 'callout_section', 'settings' => 'creative_general_options[footer_call_out_button_target]'));
    /* Footer Options */
    $wp_customize->add_section('footer_section', array('title' => __("Footer Options", "creative"), 'panel' => 'creative_theme_option', 'capability' => 'edit_theme_options', 'priority' => 40));
    $wp_customize->add_setting('creative_general_options[home_footer_enabled]', array('default' => esc_attr($wl_theme_options['home_footer_enabled']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('home_footer_enabled', array('label' => __('Enabled Copyright Section', 'creative'), 'type' => 'checkbox', 'section' => 'footer_section', 'settings' => 'creative_general_options[home_footer_enabled]'));
    $wp_customize->add_setting('creative_general_options[footer_customizations]', array('default' => esc_attr($wl_theme_options['footer_customizations']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('creative_footer_customizations', array('label' => __('Footer Customization Text', 'creative'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'creative_general_options[footer_customizations]'));
    $wp_customize->add_setting('creative_general_options[developed_by_text]', array('default' => esc_attr($wl_theme_options['developed_by_text']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('creative_developed_by_text', array('label' => __('Footer Developed By Text', 'creative'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'creative_general_options[developed_by_text]'));
    $wp_customize->add_setting('creative_general_options[developed_by_creative_text]', array('default' => esc_attr($wl_theme_options['developed_by_creative_text']), 'type' => 'option', 'sanitize_callback' => 'creative_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('creative_developed_by_creative_text', array('label' => __('Footer Company Text', 'creative'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'creative_general_options[developed_by_creative_text]'));
    $wp_customize->add_setting('creative_general_options[developed_by_link]', array('default' => esc_attr($wl_theme_options['developed_by_link']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control('creative_developed_by_link', array('label' => __('Footer Customization Link', 'creative'), 'type' => 'url', 'section' => 'footer_section', 'settings' => 'creative_general_options[developed_by_link]'));
    $wp_customize->add_section('creative_pro', array('title' => __('Upgrade to Creative Premium', 'creative'), 'priority' => 999, 'panel' => 'creative_theme_option'));
    $wp_customize->add_setting('creative_more', array('default' => null, 'sanitize_callback' => 'sanitize_text_field'));
    $wp_customize->add_control(new creative_parallax_More_Control($wp_customize, 'creative_more', array('label' => __('Creative Premium', 'creative'), 'section' => 'creative_pro', 'settings' => 'creative_more', 'priority' => 1)));
}