Make WordPress Core


Ignore:
Timestamp:
03/03/2016 07:55:15 PM (11 years ago)
Author:
obenland
Message:

Customize: Site logos are custom logos.

Brings the nomenclature closer to custom headers and backgrounds.

See ​https://wordpress.slack.com/archives/core/p1456955151003150
See #35945.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-logo.php

    r36820 r36837  
    11<?php
    22/**
    3  * Administration API: WP_Site_Logo class
     3 * Administration API: WP_Custom_Logo class
    44 *
    55 * @package WordPress
    … …  
    99
    1010/**
    11  * Core class used to implement site logo functionality.
     11 * Core class used to implement custom logo functionality.
    1212 *
    1313 * @since 4.5.0
    1414 */
    15 class WP_Site_Logo {
     15class WP_Custom_Logo {
    1616
    1717        /**
    … …  
    3535        public function head_text_styles() {
    3636                // Bail if our theme supports custom headers.
    37                 if ( current_theme_supports( 'custom-header' ) || get_theme_mod( 'site_logo_header_text', true ) ) {
     37                if ( current_theme_supports( 'custom-header' ) || get_theme_mod( 'custom_logo_header_text', true ) ) {
    3838                        return;
    3939                }
    … …  
    4141                // Is Display Header Text unchecked? If so, hide the header text.
    4242                ?>
    43                 <!-- Site Logo: hide header text -->
     43                <!-- Custom Logo: hide header text -->
    4444                <style type="text/css">
    4545                        <?php echo sanitize_html_class( $this->header_text_classes() ); ?>  {
    … …  
    5252
    5353        /**
    54          * Resets the site logo if the current logo is deleted in the media manager.
     54         * Reset the custom logo if the current logo is deleted in the media manager.
    5555         *
    5656         * @since 4.5.0
    … …  
    6060         */
    6161        public function delete_attachment_data( $post_id ) {
    62                 $site_logo_id = get_theme_mod( 'site_logo' );
     62                $custom_logo_id = get_theme_mod( 'custom_logo' );
    6363
    64                 if ( $site_logo_id && $site_logo_id == $post_id ) {
    65                         remove_theme_mod( 'site_logo' );
     64                if ( $custom_logo_id && $custom_logo_id == $post_id ) {
     65                        remove_theme_mod( 'custom_logo' );
    6666                }
    6767        }
    … …  
    106106         */
    107107        protected function header_text_classes() {
    108                 $args = get_theme_support( 'site-logo' );
     108                $args = get_theme_support( 'custom-logo' );
    109109
    110110                if ( isset( $args[0]['header-text'] ) ) {
    … …  
    132132
    133133/**
    134  * WP_Site_Logo instance.
     134 * WP_Custom_Logo instance.
    135135 *
    136  * @global WP_Site_Logo $wp_site_logo
     136 * @global WP_Custom_Logo $wp_custom_logo
    137137 */
    138 $GLOBALS['wp_site_logo'] = new WP_Site_Logo;
     138$GLOBALS['wp_custom_logo'] = new WP_Custom_Logo;
Note: See TracChangeset for help on using the changeset viewer.