get_setting( 'blogname' )->photobook_lite = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->photobook_lite = 'postMessage'; $wp_customize->add_setting('color_scheme', array( 'default' => '#027ef3', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'color_scheme',array( 'label' => __('Color Scheme','avanza-lite'), 'description' => __('Select color from here.','avanza-lite'), 'section' => 'colors', 'settings' => 'color_scheme' )) ); $wp_customize->add_setting('topheaderbg-color', array( 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'topheaderbg-color',array( 'label' => __('Top Header Background Color','avanza-lite'), 'description' => __('Select background color for Top header.','avanza-lite'), 'section' => 'colors', 'settings' => 'topheaderbg-color' )) ); $wp_customize->add_setting('headerbg-color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'headerbg-color',array( 'label' => __('Header Background color','avanza-lite'), 'description' => __('Select background color for header.','avanza-lite'), 'section' => 'colors', 'settings' => 'headerbg-color' )) ); $wp_customize->add_setting('footer-color', array( 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'footer-color',array( 'label' => __('Footer Background Color','avanza-lite'), 'description' => __('Select background color for footer.','avanza-lite'), 'section' => 'colors', 'settings' => 'footer-color' )) ); // Top Header Start $wp_customize->add_section( 'tophead_section', array( 'title' => __('Top Header', 'avanza-lite'), 'priority' => null, 'description' => __('Add top header info here.','avanza-lite'), ) ); $wp_customize->add_setting('email-txt',array( 'sanitize_callback' => 'sanitize_email' )); $wp_customize->add_control('email-txt',array( 'type' => 'text', 'label' => __('Add email here.','avanza-lite'), 'section' => 'tophead_section' )); $wp_customize->add_setting('call-txt',array( 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('call-txt',array( 'type' => 'text', 'label' => __('Add phone number here.','avanza-lite'), 'section' => 'tophead_section' )); $wp_customize->add_setting('add-txt',array( 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('add-txt',array( 'type' => 'text', 'label' => __('Add Address here.','avanza-lite'), 'section' => 'tophead_section' )); $wp_customize->add_setting('facebook',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('facebook',array( 'type' => 'url', 'label' => __('Add facebook link here.','avanza-lite'), 'section' => 'tophead_section' )); $wp_customize->add_setting('twitter',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('twitter',array( 'type' => 'url', 'label' => __('Add twitter link here.','avanza-lite'), 'section' => 'tophead_section' )); $wp_customize->add_setting('youtube',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('youtube',array( 'type' => 'url', 'label' => __('Add youtube channel link here.','avanza-lite'), 'section' => 'tophead_section' )); $wp_customize->add_setting('linkedin',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('linkedin',array( 'type' => 'url', 'label' => __('Add linkedin link here.','avanza-lite'), 'section' => 'tophead_section' )); $wp_customize->add_setting('pinterest',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('pinterest',array( 'type' => 'url', 'label' => __('Add pinterest link here.','avanza-lite'), 'section' => 'tophead_section' )); $wp_customize->add_setting('hide_tophead',array( 'default' => true, 'sanitize_callback' => 'avanza_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_tophead', array( 'settings' => 'hide_tophead', 'section' => 'tophead_section', 'label' => __('Check this to hide Top Header.','avanza-lite'), 'type' => 'checkbox' )); // Top Header End // Header Button Start $wp_customize->add_section( 'headbtn_section', array( 'title' => __('Header Button', 'avanza-lite'), 'priority' => null, 'description' => __('Add top header button text and link here.','avanza-lite'), ) ); $wp_customize->add_setting('headbtn-txt',array( 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('headbtn-txt',array( 'type' => 'text', 'label' => __('Add header button text here.','avanza-lite'), 'section' => 'headbtn_section' )); $wp_customize->add_setting('headbtn-link',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('headbtn-link',array( 'type' => 'url', 'label' => __('Add Header Button link here.','avanza-lite'), 'section' => 'headbtn_section' )); $wp_customize->add_setting('hide_headbtn',array( 'default' => true, 'sanitize_callback' => 'avanza_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_headbtn', array( 'settings' => 'hide_headbtn', 'section' => 'headbtn_section', 'label' => __('Check this to hide Top Header.','avanza-lite'), 'type' => 'checkbox' )); // Header Button End // Slider Section Start $wp_customize->add_section( 'slider_section', array( 'title' => __('Slider Settings', 'avanza-lite'), 'priority' => null, 'description' => __('Recommended image size (1420x567). Slider will work only when you select the static front page.','avanza-lite'), ) ); $wp_customize->add_setting('page-setting7',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting7',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide one:','avanza-lite'), 'section' => 'slider_section' )); $wp_customize->add_setting('page-setting8',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting8',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide two:','avanza-lite'), 'section' => 'slider_section' )); $wp_customize->add_setting('page-setting9',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting9',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide three:','avanza-lite'), 'section' => 'slider_section' )); $wp_customize->add_setting('slide_text',array( 'default' => __('Read More','avanza-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('slide_text',array( 'label' => __('Add slider link button text.','avanza-lite'), 'section' => 'slider_section', 'setting' => 'slide_text', 'type' => 'text' )); $wp_customize->add_setting('hide_slider',array( 'default' => true, 'sanitize_callback' => 'avanza_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_slider', array( 'settings' => 'hide_slider', 'section' => 'slider_section', 'label' => __('Check this to hide slider.','avanza-lite'), 'type' => 'checkbox' )); // Slider Section End // First Section Start $wp_customize->add_section( 'first_section', array( 'title' => __('First Section', 'avanza-lite'), 'priority' => null, 'description' => __('Select pages for First Section. This section will be displayed only when you select the static front page.','avanza-lite'), ) ); $wp_customize->add_setting('fsecttl',array( 'default' => __('When You Need Expert Security','avanza-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('fsecttl',array( 'label' => __('Add Section title here.','avanza-lite'), 'section' => 'first_section', 'setting' => 'fsecttl', 'type' => 'text' )); $wp_customize->add_setting('page-setting1',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting1',array( 'type' => 'dropdown-pages', 'label' => __('Select page for 1st column','avanza-lite'), 'section' => 'first_section' )); $wp_customize->add_setting('page-setting2',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting2',array( 'type' => 'dropdown-pages', 'label' => __('Select page for 2nd column','avanza-lite'), 'section' => 'first_section' )); $wp_customize->add_setting('page-setting3',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting3',array( 'type' => 'dropdown-pages', 'label' => __('Select page for 3rd column','avanza-lite'), 'section' => 'first_section' )); $wp_customize->add_setting('page-setting4',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting4',array( 'type' => 'dropdown-pages', 'label' => __('Select page for 4th column','avanza-lite'), 'section' => 'first_section' )); $wp_customize->add_setting('fsecmore',array( 'default' => __('Read More','avanza-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('fsecmore',array( 'label' => __('Add Read More Text here.','avanza-lite'), 'section' => 'first_section', 'setting' => 'fsecmore', 'type' => 'text' )); $wp_customize->add_setting('hide_first_section',array( 'default' => true, 'sanitize_callback' => 'avanza_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_first_section', array( 'settings' => 'hide_first_section', 'section' => 'first_section', 'label' => __('Check this to hide section.','avanza-lite'), 'type' => 'checkbox' )); // First Section End // Second Section Start $wp_customize->add_section( 'homepage_second_section', array( 'title' => __('Second Section', 'avanza-lite'), 'priority' => null, 'description' => __('Select page for homepage second section. This section will be displayed only when you select the static front page.','avanza-lite'), ) ); $wp_customize->add_setting('ser-second-sec-ttl',array( 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('ser-second-sec-ttl',array( 'type' => 'text', 'label' => __('Add Section Sub Title Here','avanza-lite'), 'section' => 'homepage_second_section' )); $wp_customize->add_setting('ser-setting1',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('ser-setting1',array( 'type' => 'dropdown-pages', 'label' => __('Select page for second section','avanza-lite'), 'section' => 'homepage_second_section' )); $wp_customize->add_setting('ssecmore',array( 'default' => __('Read More','avanza-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('ssecmore',array( 'label' => __('Add Read More Text here.','avanza-lite'), 'section' => 'homepage_second_section', 'setting' => 'fsecmore', 'type' => 'text' )); $wp_customize->add_setting('hide_second_section',array( 'default' => true, 'sanitize_callback' => 'avanza_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_second_section', array( 'settings' => 'hide_second_section', 'section' => 'homepage_second_section', 'label' => __('Check this to hide section.','avanza-lite'), 'type' => 'checkbox' )); // Second Section End } add_action( 'customize_register', 'avanza_lite_customize_register' ); function avanza_lite_css(){ ?>