Make WordPress Core

Ticket #44656: 44656.1.diff

File 44656.1.diff, 1.1 KB (added by sabernhardt, 4 years ago)

checks for site title and tagline in Twenty Twelve header

  • src/wp-content/themes/twentytwelve/header.php

     
    3636<div id="page" class="hfeed site">
    3737        <header id="masthead" class="site-header" role="banner">
    3838                <hgroup>
    39                         <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    40                         <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
     39                        <?php if ( ! empty( get_bloginfo( 'name' ) ) ) : ?>
     40                                <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
     41                        <?php endif; ?>
     42                        <?php if ( ! empty( get_bloginfo( 'description' ) ) ) : ?>
     43                                <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
     44                        <?php endif; ?>
    4145                </hgroup>
    4246
    4347                <nav id="site-navigation" class="main-navigation" role="navigation">