WordPress.org

Make WordPress Core

Ticket #18887: custom-header.php.display_header_text.diff

File custom-header.php.display_header_text.diff, 1.5 KB (added by chipbennett, 3 years ago)

Propagate use of display_header_text() in \wp-admin\custom-header.php

  • .

     
    488488        ?> 
    489489        <div id="headimg" style="max-width:<?php echo HEADER_IMAGE_WIDTH; ?>px;height:<?php echo HEADER_IMAGE_HEIGHT; ?>px;background-image:url(<?php esc_url ( header_image() ) ?>);"> 
    490490                <?php 
    491                 if ( 'blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || '' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || ! $this->header_text() ) 
     491                if ( ! display_header_text() || ! $this->header_text() ) 
    492492                        $style = ' style="display:none;"'; 
    493493                else 
    494494                        $style = ' style="color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';"'; 
     
    578578<th scope="row"><?php _e( 'Display Text' ); ?></th> 
    579579<td> 
    580580        <p> 
    581         <?php $hidetext = get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ); ?> 
    582         <label><input type="radio" value="1" name="hidetext" id="hidetext"<?php checked( ( 'blank' == $hidetext || empty( $hidetext ) )  ? true : false ); ?> /> <?php _e( 'No' ); ?></label> 
    583         <label><input type="radio" value="0" name="hidetext" id="showtext"<?php checked( ( 'blank' == $hidetext || empty( $hidetext ) ) ? false : true ); ?> /> <?php _e( 'Yes' ); ?></label> 
     581        <label><input type="radio" value="1" name="hidetext" id="hidetext"<?php checked( display_header_text()  ? false : true ); ?> /> <?php _e( 'No' ); ?></label> 
     582        <label><input type="radio" value="0" name="hidetext" id="showtext"<?php checked( display_header_text() ? true : false ); ?> /> <?php _e( 'Yes' ); ?></label> 
    584583        </p> 
    585584</td> 
    586585</tr>