WordPress.org

Make WordPress Core

Ticket #38391: 38391.diff

File 38391.diff, 939 bytes (added by Idealien, 5 years ago)
  • src/wp-content/themes/twentyseventeen/inc/customizer.php

    diff --git src/wp-content/themes/twentyseventeen/inc/customizer.php src/wp-content/themes/twentyseventeen/inc/customizer.php
    index 6e2db28..0b066a0 100644
    function twentyseventeen_customize_register( $wp_customize ) { 
    6161                'priority' => 6,
    6262        ) ) );
    6363
     64        $wp_customize->get_control( 'header_textcolor' )->active_callback = 'twentyseventeen_is_header_textcolor_visible';
     65
    6466        /**
    6567         * Theme options.
    6668         */
    function twentyseventeen_is_view_with_layout_option() { 
    192194}
    193195
    194196/**
     197 * Return whether the header textcolor control should be visible or not
     198 */
     199function twentyseventeen_is_header_textcolor_visible(){
     200        return ( has_header_image() || has_header_video() );
     201}
     202
     203/**
    195204 * Bind JS handlers to instantly live-preview changes.
    196205 */
    197206function twentyseventeen_customize_preview_js() {