get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->add_section( 'andre_theme_options', array( 'title' => esc_html__( 'Theme Options', 'andre-lite' ), 'priority' => 125, ) ); $wp_customize->add_setting( 'skills_front', array( 'default' => esc_html__( 'I am a', 'andre-lite' ), 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'skills_front', array( 'label' => esc_html__( 'Text to display before skills', 'andre-lite' ), 'section' => 'andre_theme_options', 'type' => 'text', ) ); $wp_customize->add_setting( 'skills_text', array( 'default' => "'web designer', 'graphic designer', 'app developer'", 'sanitize_callback' => 'wp_kses_post', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'skills_text', array( 'label' => esc_html__( 'Add skills in front page as below format.', 'andre-lite' ), 'section' => 'andre_theme_options', 'type' => 'textarea', ) ); $wp_customize->add_setting( 'skills_color', array( 'default' => "'#f44336','#40E0D0','#FF8C00'", 'sanitize_callback' => 'wp_kses_post', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'skills_color', array( 'label' => esc_html__( 'Add colors for each skill as below format.', 'andre-lite' ), 'section' => 'andre_theme_options', 'type' => 'textarea', ) ); $wp_customize->add_setting( 'copyright_text', array( 'default' => '', 'sanitize_callback' => 'wp_kses_post', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'copyright_text', array( 'label' => esc_html__( 'Add copyright text in the footer.', 'andre-lite' ), 'section' => 'andre_theme_options', 'type' => 'textarea', ) ); $wp_customize->add_setting( 'text-color', array( 'default' => '#eaeaea', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'text-color', array( 'label' => esc_html__( 'General text color', 'andre-lite' ), 'section' => 'colors', 'settings' => 'text-color', 'priority' => 8, ) ) ); $wp_customize->add_setting( 'menu-links', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu-links', array( 'label' => esc_html__( 'Menu links', 'andre-lite' ), 'section' => 'colors', 'settings' => 'menu-links', 'priority' => 10, ) ) ); $wp_customize->add_setting( 'secondary-color', array( 'default' => '#f44336', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary-color', array( 'label' => esc_html__( 'Change the theme red color throughout', 'andre-lite' ), 'section' => 'colors', 'settings' => 'secondary-color', 'priority' => 12, ) ) ); $wp_customize->add_setting( 'title-color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'title-color', array( 'label' => esc_html__( 'Titles color', 'andre-lite' ), 'section' => 'colors', 'settings' => 'title-color', 'priority' => 14, ) ) ); } add_action( 'customize_register', 'andre_customize_register' ); /** * Change colors. */ function andre_customizer_css() { ?>