Ticket #37516: theme-example-37516.diff
File theme-example-37516.diff, 3.2 KB (added by , 8 years ago) |
---|
-
src/wp-content/themes/twentyseventeen/functions.php
55 55 56 56 add_image_size( 'twentyseventeen-thumbnail-avatar', 100, 100, true ); 57 57 58 add_theme_support( 'custom-title-tagline' ); 59 58 60 // Set the default content width. 59 61 $GLOBALS['content_width'] = 525; 60 62 -
src/wp-content/themes/twentyseventeen/inc/customizer.php
19 19 20 20 $wp_customize->selective_refresh->add_partial( 'blogname', array( 21 21 'selector' => '.site-title a', 22 'settings' => array( 'blogname', 'header_display_title' ), 22 23 'render_callback' => 'twentyseventeen_customize_partial_blogname', 23 24 ) ); 24 25 $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 25 26 'selector' => '.site-description', 27 'settings' => array( 'blogdescription', 'header_display_tagline' ), 26 28 'render_callback' => 'twentyseventeen_customize_partial_blogdescription', 27 29 ) ); 28 30 … … 163 165 * @return void 164 166 */ 165 167 function twentyseventeen_customize_partial_blogname() { 166 bloginfo( 'name' ); 168 if ( get_option( 'header_display_title' ) ) 169 bloginfo( 'name' ); 167 170 } 168 171 169 172 /** … … 175 178 * @return void 176 179 */ 177 180 function twentyseventeen_customize_partial_blogdescription() { 178 bloginfo( 'description' ); 181 if ( get_option( 'header_display_tagline' ) ) 182 bloginfo( 'description' ); 179 183 } 180 184 181 185 /** -
src/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php
16 16 17 17 <div class="site-branding-text"> 18 18 <?php if ( is_front_page() ) : ?> 19 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> 19 <?php if ( get_option( 'header_display_title' ) ) : ?> 20 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> 21 <?php endif; ?> 20 22 <?php else : ?> 21 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> 23 <?php if ( get_option( 'header_display_title' ) ) : ?> 24 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> 25 <?php endif; ?> 22 26 <?php endif; ?> 23 27 24 28 <?php … … 26 30 27 31 if ( $description || is_customize_preview() ) : 28 32 ?> 29 <p class="site-description"><?php echo $description; ?></p> 33 <?php if ( get_option( 'header_display_tagline' ) ) : ?> 34 <p class="site-description"><?php echo $description; ?></p> 35 <?php endif; ?> 30 36 <?php endif; ?> 31 37 </div><!-- .site-branding-text --> 32 38