Automattic / Iris

A(n awesome) Color Picker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allways display `label` and `description` text above color-picker button

onedrop2000 opened this issue · comments

commented

Hi there,
When I use the default WP_Customize_Color_Control Class the labeland descirption are displayed above the color-picker, but when I use the WP_Customize_Color_Control Class the labeland descriptiontext is shown after clicking on the color picker button, so the text is hidden.

See on the picture. The first picker is the WP_Customize_Color_Control, the rest is the WP_Customize_Color_Control Class.
bildschirmfoto 2018-04-17 um 11 52 19

The Code looks like that:

<?php
    // Text Color
    $wp_customize->add_setting( 'nav_text_color', array(
      'default'           => '',
    ) );
    $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'nav_text_color', array(
      'label'    => esc_html__( 'Custom Style Options', 'onedrop_template' ),
      'description' => esc_html__( 'Text Color', 'onedropTemplate' ),
      'section'  => 'header_menulayout_section',
      'settings' => 'nav_text_color',
      'show_opacity' => true, // Optional.
      'priority' => 10
    ) ) );

    // Background Nav Color
    $wp_customize->add_setting( 'nav_background_color', array(
      'default'           => '',
    ) );
    $wp_customize->add_control( new Customize_Alpha_Color_Control( $wp_customize, 'nav_background_color', array(
      'description' => esc_html__( 'Background Color', 'onedropTemplate' ),
      'section'  => 'header_menulayout_section',
      'settings' => 'nav_background_color',
      'priority' => 10
    ) ) );
?>

Any Ideas? Thanks :))