Support » Fixing WordPress » Displaying Title And Tagline – mis-match in WP_Customizer_Manager

  • Hi,
    while customizing ‘Display Site Title and Tagline’ I found the following code
    in class_WP_Customizer_Manager.php:

    // Input type: checkbox.
    // With custom value.
    $this->add_control(
    ‘display_header_text’,
    array(
    ‘settings’ => ‘header_textcolor’,
    ‘label’ => __( ‘Display Site Title and Tagline’ ),
    ‘section’ => ‘title_tagline’,
    ‘type’ => ‘checkbox’,
    ‘priority’ => 40,
    )
    );

    surely ‘header_textcolor’ isn’t meant to be there ?
    is this control meant to be here?
    (it is correctly conditionally added above this line)
    clearly I don’t want to change this file –
    so I removed the control before working with it myself – using:
    $wp_customize->remove_control(‘display_header_text’);

    cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • Joy

    (@joyously)

    It is not a mistake. It is the result of a bad decision to make the header text color and the site title interact, with the thinking that only the site title and description would use the header text color.
    Themes have to deal with this ever since this bad decision.
    So when the checkbox for hiding the site title is used, the header text color is set to ‘blank’. There is code to check for ‘blank’ color. It’s a mess.

    Thread Starter kevinjapan

    (@kevinjapan)

    well, that’s a surprising solution – thanks for the reply and info. – a workaround then for me I guess. it’s unnecessarily confusing – for code so heavily commented throughout – maybe there should be some explanation in the code for what sounds like is effectively a hack.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.