WordPress.org

Make WordPress Core

Ticket #35944: twentyfifteen-site-logo.diff

File twentyfifteen-site-logo.diff, 1.1 KB (added by celloexpressions, 5 years ago)

The raw basics - needs some refinement.

  • src/wp-content/themes/twentyfifteen/functions.php

     
    7171         * provide it for us.
    7272         */
    7373        add_theme_support( 'title-tag' );
     74        add_theme_support( 'site-logo', array( 'size' => 'large' ) );
    7475
    7576        /*
    7677         * Enable support for Post Thumbnails on posts and pages.
  • src/wp-content/themes/twentyfifteen/header.php

     
    2828        <div id="sidebar" class="sidebar">
    2929                <header id="masthead" class="site-header" role="banner">
    3030                        <div class="site-branding">
     31                                <?php the_site_logo(); ?>
    3132                                <?php
    3233                                        if ( is_front_page() && is_home() ) : ?>
    3334                                                <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>