dd_setting( 'on_secondary_color', array( 'default' => tripp_default_color( 'on_secondary' ), 'transport' => 'postMessage', 'sanitize_callback' => 'tripp_customize_sanitize_number', ) ); $wp_customize->add_control( new Tripp_Customize_Range_Control( $wp_customize, 'on_secondary_color', array( 'section' => 'colors', 'label' => esc_html__( 'On Secondary Color', 'tripp' ), 'description' => esc_html__( 'The color for text and icons that appear in front of surfaces using the Secondary Color.', 'tripp' ), 'input_attrs' => array( 'min' => 0, 'max' => 255, ), 'marks' => array( 0 => 0, 255 => 255, ), ) ) ); // Colors -> Card Color. $wp_customize->add_setting( 'surface_color', array( 'default' => tripp_default_color( 'surface' ), 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'surface_color', array( 'section' => 'colors', 'label' => esc_html__( 'Surface Color', 'tripp' ), 'description' => esc_html__( 'The color for cards and surfaces.', 'tripp' ), ) ) ); // Colors -> Card Color (Dark Mode). $wp_customize->add_setting( 'surface_dark_color', array( 'default' => tripp_default_color( 'surface_dark' ), 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'surface_dark_color', array( 'section' => 'colors', 'label' => esc_html__( 'Surface Color (Dark Mode)', 'tripp' ), 'description' => esc_html__( 'The color for cards and surfaces.', 'tripp' ), ) ) ); // Colors -> Text Color. $wp_customize->add_setting( 'on_surface_color', array( 'default' => tripp_default_color( 'on_surface' ), 'transport' => 'postMessage', 'sanitize_callback' => 'tripp_customize_sanitize_number', ) ); $wp_customize->add_control( new Tripp_Customize_Range_Control( $wp_customize, 'on_surface_color', array( 'section' => 'colors', 'label' => esc_html__( 'Text Color', 'tripp' ), 'description' => sprintf( /* translators: %s: Default value */ esc_html__( 'Base color for text that appear in the whole site. Default value: %s.', 'tripp' ), tripp_default_color( 'on_surface' ) ), 'input_attrs' => array( 'min' => 0, 'max' => 255, ), 'marks' => array( 0 => 0, 255 => 255, ), ) ) ); // Colors -> Text Color (Dark Mode). $wp_customize->add_setting( 'on_surface_dark_color', array( 'default' => tripp_default_color( 'on_surface_dark' ), 'transport' => 'postMessage', 'sanitize_callback' => 'tripp_customize_sanitize_number', ) ); $wp_customize->add_control( new Tripp_Customize_Range_Control( $wp_customize, 'on_surface_dark_color', array( 'section' => 'colors', 'label' => esc_html__( 'Text Color (Dark Mode)', 'tripp' ), 'description' => sprintf( /* translators: %s: Default value */ esc_html__( 'Base color for text that appear in the whole site. Default value: %s.', 'tripp' ), tripp_default_color( 'on_surface_dark' ) ), 'input_attrs' => array( 'min' => 0, 'max' => 255, ), 'marks' => array( 0 => 0, 255 => 255, ), ) ) ); } add_action( 'customize_register', 'tripp_customizer_register_colors_settings', 20 );