Making WordPress.org

Changeset 6881


Ignore:
Timestamp:
03/15/2018 11:26:48 PM (7 years ago)
Author:
iandunn
Message:

WP15: Add site logo.

Location:
sites/trunk/wp15.wordpress.net/public_html/content/themes/twentyseventeen-wp15
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wp15.wordpress.net/public_html/content/themes/twentyseventeen-wp15/functions.php

    r6876 r6881  
    66
    77add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_scripts' );
     8add_filter( 'get_custom_logo',    __NAMESPACE__ . '\set_custom_logo' );
    89
    910/**
     
    1617    );
    1718}
     19
     20/**
     21 * Set the custom logo.
     22 *
     23 * @return string
     24 */
     25function set_custom_logo() {
     26    ob_start();
     27
     28    ?>
     29
     30    <a href="<?php echo esc_url( home_url() ); ?>" class="custom-logo-link" rel="home" itemprop="url">
     31        <img src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/images/wp15-logo.svg" class="custom-logo" alt="WordPress 15th anniversary logo" itemprop="logo" />
     32    </a>
     33
     34
     35    <?php
     36
     37    return ob_get_clean();
     38};
Note: See TracChangeset for help on using the changeset viewer.