Ticket #35945: 35945.diff
File 35945.diff, 24.2 KB (added by , 8 years ago) |
---|
-
src/wp-admin/css/customize-controls.css
721 721 .customize-control-background .current, 722 722 .customize-control-cropped_image .current, 723 723 .customize-control-site_icon .current, 724 .customize-control- site_logo .current,724 .customize-control-custom_logo .current, 725 725 .customize-control-header .current { 726 726 margin-bottom: 8px; 727 727 } … … 763 763 .customize-control-site_icon .remove-button, 764 764 .customize-control-site_icon .default-button, 765 765 .customize-control-site_icon .upload-button, 766 .customize-control- site_logo .remove-button,767 .customize-control- site_logo .default-button,768 .customize-control- site_logo .upload-button,766 .customize-control-custom_logo .remove-button, 767 .customize-control-custom_logo .default-button, 768 .customize-control-custom_logo .upload-button, 769 769 .customize-control-header button.new, 770 770 .customize-control-header button.remove { 771 771 white-space: normal; … … 779 779 .customize-control-background .current .container, 780 780 .customize-control-cropped_image .current .container, 781 781 .customize-control-site_icon .current .container, 782 .customize-control- site_logo .current .container,782 .customize-control-custom_logo .current .container, 783 783 .customize-control-header .current .container { 784 784 overflow: hidden; 785 785 -webkit-border-radius: 2px; … … 793 793 .customize-control-background .current .container, 794 794 .customize-control-cropped_image .current .container, 795 795 .customize-control-site_icon .current .container, 796 .customize-control- site_logo .current .container,796 .customize-control-custom_logo .current .container, 797 797 .customize-control-image .current .container { 798 798 min-height: 40px; 799 799 } … … 822 822 .customize-control-background .inner, 823 823 .customize-control-cropped_image .inner, 824 824 .customize-control-site_icon .inner, 825 .customize-control- site_logo .inner,825 .customize-control-custom_logo .inner, 826 826 .customize-control-header .inner { 827 827 display: none; 828 828 position: absolute; … … 838 838 .customize-control-background .inner, 839 839 .customize-control-cropped_image .inner, 840 840 .customize-control-site_icon .inner, 841 .customize-control- site_logo .inner,841 .customize-control-custom_logo .inner, 842 842 .customize-control-image .inner { 843 843 display: block; 844 844 min-height: 40px; … … 850 850 .customize-control-background .inner, 851 851 .customize-control-cropped_image .inner, 852 852 .customize-control-site_icon .inner, 853 .customize-control- site_logo.inner,853 .customize-control-custom_logo.inner, 854 854 .customize-control-header .inner, 855 855 .customize-control-header .inner .dashicons { 856 856 line-height: 20px; … … 994 994 .customize-control-cropped_image .default-button, 995 995 .customize-control-site_icon .remove-button, 996 996 .customize-control-site_icon .default-button, 997 .customize-control- site_logo .remove-button,998 .customize-control- site_logo .default-button,997 .customize-control-custom_logo .remove-button, 998 .customize-control-custom_logo .default-button, 999 999 .customize-control-header .remove { 1000 1000 float: left; 1001 1001 margin-right: 3px; … … 1007 1007 .customize-control-background .upload-button, 1008 1008 .customize-control-cropped_image .upload-button, 1009 1009 .customize-control-site_icon .upload-button, 1010 .customize-control- site_logo .upload-button,1010 .customize-control-custom_logo .upload-button, 1011 1011 .customize-control-header .new { 1012 1012 float: right; 1013 1013 } -
src/wp-admin/includes/admin.php
72 72 /** WordPress Site Icon API */ 73 73 require_once(ABSPATH . 'wp-admin/includes/class-wp-site-icon.php'); 74 74 75 /** WordPress SiteLogo API */76 require_once(ABSPATH . 'wp-admin/includes/class-wp- site-logo.php');75 /** WordPress Custom Logo API */ 76 require_once(ABSPATH . 'wp-admin/includes/class-wp-custom-logo.php'); 77 77 78 78 /** WordPress Update Administration API */ 79 79 require_once(ABSPATH . 'wp-admin/includes/update.php'); -
src/wp-admin/includes/class-wp-custom-logo.php
1 1 <?php 2 2 /** 3 * Administration API: WP_ Site_Logo class3 * Administration API: WP_Custom_Logo class 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 8 8 */ 9 9 10 10 /** 11 * Core class used to implement sitelogo functionality.11 * Core class used to implement custom logo functionality. 12 12 * 13 13 * @since 4.5.0 14 14 */ 15 class WP_ Site_Logo {15 class WP_Custom_Logo { 16 16 17 17 /** 18 18 * Get current logo settings stored in theme mod. … … 34 34 */ 35 35 public function head_text_styles() { 36 36 // 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 ) ) { 38 38 return; 39 39 } 40 40 41 41 // Is Display Header Text unchecked? If so, we need to hide our header text. 42 42 ?> 43 <!-- SiteLogo: hide header text -->43 <!-- Custom Logo: hide header text --> 44 44 <style type="text/css"> 45 45 <?php echo sanitize_html_class( $this->header_text_classes() ); ?> { 46 46 position: absolute; … … 51 51 } 52 52 53 53 /** 54 * Reset the sitelogo 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. 55 55 * 56 56 * @since 4.5.0 57 57 * @access public … … 59 59 * @param int $post_id 60 60 */ 61 61 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' ); 63 63 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' ); 66 66 } 67 67 } 68 68 … … 103 103 * @return string String of classes to hide 104 104 */ 105 105 protected function header_text_classes() { 106 $args = get_theme_support( ' site-logo' );106 $args = get_theme_support( 'custom-logo' ); 107 107 108 108 if ( isset( $args[0]['header-text'] ) ) { 109 109 // Use any classes defined in add_theme_support(). … … 129 129 } 130 130 131 131 /** 132 * WP_ Site_Logo instance.132 * WP_Custom_Logo instance. 133 133 * 134 * @global WP_ Site_Logo $wp_site_logo134 * @global WP_Custom_Logo $wp_custom_logo 135 135 */ 136 $GLOBALS['wp_ site_logo'] = new WP_Site_Logo;136 $GLOBALS['wp_custom_logo'] = new WP_Custom_Logo; -
src/wp-admin/includes/class-wp-site-logo.php
1 <?php2 /**3 * Administration API: WP_Site_Logo class4 *5 * @package WordPress6 * @subpackage Administration7 * @since 4.5.08 */9 10 /**11 * Core class used to implement site logo functionality.12 *13 * @since 4.5.014 */15 class WP_Site_Logo {16 17 /**18 * Get current logo settings stored in theme mod.19 *20 * @since 4.5.021 * @access public22 */23 public function __construct() {24 add_action( 'wp_head', array( $this, 'head_text_styles' ) );25 add_action( 'delete_attachment', array( $this, 'delete_attachment_data' ) );26 add_filter( 'image_size_names_choose', array( $this, 'media_manager_image_sizes' ) );27 }28 29 /**30 * Hide header text on front end if necessary.31 *32 * @since 4.5.033 * @access public34 */35 public function head_text_styles() {36 // Bail if our theme supports custom headers.37 if ( current_theme_supports( 'custom-header' ) || get_theme_mod( 'site_logo_header_text', true ) ) {38 return;39 }40 41 // Is Display Header Text unchecked? If so, we need to hide our header text.42 ?>43 <!-- Site Logo: hide header text -->44 <style type="text/css">45 <?php echo sanitize_html_class( $this->header_text_classes() ); ?> {46 position: absolute;47 clip: rect(1px, 1px, 1px, 1px);48 }49 </style>50 <?php51 }52 53 /**54 * Reset the site logo if the current logo is deleted in the media manager.55 *56 * @since 4.5.057 * @access public58 *59 * @param int $post_id60 */61 public function delete_attachment_data( $post_id ) {62 $site_logo_id = get_theme_mod( 'site_logo' );63 64 if ( $site_logo_id && $site_logo_id == $post_id ) {65 remove_theme_mod( 'site_logo' );66 }67 }68 69 /**70 * Make custom image sizes available to the media manager.71 *72 * @since 4.5.073 * @access public74 *75 * @param array $sizes Image sizes.76 * @return array All default and registered custom image sizes.77 */78 public function media_manager_image_sizes( $sizes ) {79 80 // Get an array of all registered image sizes.81 $intermediate = get_intermediate_image_sizes();82 83 // Have we got anything fun to work with?84 if ( is_array( $intermediate ) && ! empty( $intermediate ) ) {85 foreach ( $intermediate as $key => $size ) {86 87 // If the size isn't already in the $sizes array, add it.88 if ( ! array_key_exists( $size, $sizes ) ) {89 $sizes[ $size ] = $size;90 }91 }92 }93 94 return $sizes;95 }96 97 /**98 * Get header text classes. If not defined in add_theme_support(), defaults from Underscores will be used.99 *100 * @since 4.5.0101 * @access protected102 *103 * @return string String of classes to hide104 */105 protected function header_text_classes() {106 $args = get_theme_support( 'site-logo' );107 108 if ( isset( $args[0]['header-text'] ) ) {109 // Use any classes defined in add_theme_support().110 $classes = $args[0]['header-text'];111 } else {112 // Otherwise, use these defaults, which will work with any Underscores-based theme.113 $classes = array(114 'site-title',115 'site-description',116 );117 }118 119 // If we've got an array, reduce them to a string for output.120 if ( is_array( $classes ) ) {121 $classes = array_map( 'sanitize_html_class', $classes );122 $classes = (string) '.' . implode( ', .', $classes );123 } else {124 $classes = (string) '.' . $classes;125 }126 127 return $classes;128 }129 }130 131 /**132 * WP_Site_Logo instance.133 *134 * @global WP_Site_Logo $wp_site_logo135 */136 $GLOBALS['wp_site_logo'] = new WP_Site_Logo; -
src/wp-admin/js/customize-controls.js
2303 2303 }); 2304 2304 2305 2305 /** 2306 * A control for selecting Site Logos.2306 * A control for selecting custom logos. 2307 2307 * 2308 2308 * @class 2309 2309 * @augments wp.customize.MediaControl 2310 2310 * @augments wp.customize.Control 2311 2311 * @augments wp.customize.Class 2312 2312 */ 2313 api. SiteLogoControl = api.MediaControl.extend({2313 api.CustomLogoControl = api.MediaControl.extend({ 2314 2314 2315 2315 /** 2316 2316 * When the control's DOM structure is ready, … … 2330 2330 2331 2331 control.setting.bind( function( attachmentId ) { 2332 2332 wp.media.attachment( attachmentId ).fetch().done( function() { 2333 wp.customize.previewer.send( ' site-logo-attachment-data', this.attributes );2333 wp.customize.previewer.send( 'custom-logo-attachment-data', this.attributes ); 2334 2334 } ); 2335 2335 2336 2336 // Re-render whenever the control's setting changes. … … 3245 3245 image: api.ImageControl, 3246 3246 cropped_image: api.CroppedImageControl, 3247 3247 site_icon: api.SiteIconControl, 3248 site_logo: api.SiteLogoControl,3248 custom_logo: api.CustomLogoControl, 3249 3249 header: api.HeaderControl, 3250 3250 background: api.BackgroundControl, 3251 3251 theme: api.ThemeControl -
src/wp-includes/class-wp-customize-manager.php
217 217 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-control.php' ); 218 218 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php' ); 219 219 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-site-icon-control.php' ); 220 require_once( ABSPATH . WPINC . '/customize/class-wp-customize- site-logo-control.php' );220 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-custom-logo-control.php' ); 221 221 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-control.php' ); 222 222 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-theme-control.php' ); 223 223 require_once( ABSPATH . WPINC . '/customize/class-wp-widget-area-customize-control.php' ); … … 1848 1848 $this->register_control_type( 'WP_Customize_Background_Image_Control' ); 1849 1849 $this->register_control_type( 'WP_Customize_Cropped_Image_Control' ); 1850 1850 $this->register_control_type( 'WP_Customize_Site_Icon_Control' ); 1851 $this->register_control_type( 'WP_Customize_ Site_Logo_Control' );1851 $this->register_control_type( 'WP_Customize_Custom_Logo_Control' ); 1852 1852 $this->register_control_type( 'WP_Customize_Theme_Control' ); 1853 1853 1854 1854 /* Themes */ … … 1960 1960 'width' => 512, 1961 1961 ) ) ); 1962 1962 1963 $this->add_setting( ' site_logo', array(1964 'theme_supports' => array( ' site-logo' ),1963 $this->add_setting( 'custom_logo', array( 1964 'theme_supports' => array( 'custom-logo' ), 1965 1965 'transport' => 'postMessage', 1966 1966 ) ); 1967 1967 1968 $this->add_control( new WP_Customize_ Site_Logo_Control( $this, 'site_logo', array(1968 $this->add_control( new WP_Customize_Custom_Logo_Control( $this, 'custom_logo', array( 1969 1969 'label' => __( 'Logo' ), 1970 1970 'section' => 'title_tagline', 1971 1971 'priority' => 0, 1972 1972 ) ) ); 1973 1973 1974 1974 if ( isset( $this->selective_refresh ) ) { 1975 $this->selective_refresh->add_partial( ' site_logo', array(1976 'settings' => array( ' site_logo' ),1977 'selector' => '. site-logo-link',1978 'render_callback' => array( $this, '_render_ site_logo_partial' ),1975 $this->selective_refresh->add_partial( 'custom_logo', array( 1976 'settings' => array( 'custom_logo' ), 1977 'selector' => '.custom-logo-link', 1978 'render_callback' => array( $this, '_render_custom_logo_partial' ), 1979 1979 'container_inclusive' => true, 1980 1980 ) ); 1981 1981 } … … 2211 2211 } 2212 2212 2213 2213 /** 2214 * Callback for rendering the site logo, used in the site_logo partial.2214 * Callback for rendering the custom logo, used in the custom_logo partial. 2215 2215 * 2216 2216 * This method exists because the partial object and context data are passed 2217 * into a partial's render_callback so we cannot use get_ the_site_logo() as2217 * into a partial's render_callback so we cannot use get_custom_logo() as 2218 2218 * the render_callback directly since it expects a blog ID as the first 2219 2219 * argument. When WP no longer supports PHP 5.3, this method can be removed 2220 2220 * in favor of an anonymous function. … … 2224 2224 * @since 4.5.0 2225 2225 * @access private 2226 2226 * 2227 * @return string Sitelogo.2227 * @return string Custom logo. 2228 2228 */ 2229 public function _render_ site_logo_partial() {2230 return get_ the_site_logo();2229 public function _render_custom_logo_partial() { 2230 return get_custom_logo(); 2231 2231 } 2232 2232 } 2233 2233 -
src/wp-includes/customize/class-wp-customize-custom-logo-control.php
1 1 <?php 2 2 /** 3 * Customize API: WP_Customize_ Site_Logo_Control class3 * Customize API: WP_Customize_Custom_Logo_Control class 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Customize … … 8 8 */ 9 9 10 10 /** 11 * Customize Site Logo control class.11 * Customize custom logo control class. 12 12 * 13 13 * Used only for custom functionality in JavaScript. 14 14 * … … 16 16 * 17 17 * @see WP_Customize_Image_Control 18 18 */ 19 class WP_Customize_ Site_Logo_Control extends WP_Customize_Image_Control {19 class WP_Customize_Custom_Logo_Control extends WP_Customize_Image_Control { 20 20 21 21 /** 22 22 * Control type. … … 25 25 * @access public 26 26 * @var string 27 27 */ 28 public $type = ' site_logo';28 public $type = 'custom_logo'; 29 29 30 30 /** 31 31 * Constructor. -
src/wp-includes/customize/class-wp-customize-site-logo-control.php
1 <?php2 /**3 * Customize API: WP_Customize_Site_Logo_Control class4 *5 * @package WordPress6 * @subpackage Customize7 * @since 4.5.08 */9 10 /**11 * Customize Site Logo control class.12 *13 * Used only for custom functionality in JavaScript.14 *15 * @since 4.5.016 *17 * @see WP_Customize_Image_Control18 */19 class WP_Customize_Site_Logo_Control extends WP_Customize_Image_Control {20 21 /**22 * Control type.23 *24 * @since 4.5.025 * @access public26 * @var string27 */28 public $type = 'site_logo';29 30 /**31 * Constructor.32 *33 * @since 4.5.034 * @access public35 *36 * @param WP_Customize_Manager $manager Customizer bootstrap instance.37 * @param string $id Control ID.38 * @param array $args Optional. Arguments to override class property defaults.39 */40 public function __construct( $manager, $id, $args = array() ) {41 parent::__construct( $manager, $id, $args );42 43 $this->button_labels = array(44 'select' => __( 'Select logo' ),45 'change' => __( 'Change logo' ),46 'remove' => __( 'Remove' ),47 'default' => __( 'Default' ),48 'placeholder' => __( 'No logo selected' ),49 'frame_title' => __( 'Select logo' ),50 'frame_button' => __( 'Choose logo' ),51 );52 }53 } -
src/wp-includes/general-template.php
839 839 } 840 840 841 841 /** 842 * Whether the site has a Site Logo.842 * Whether the site has a custom logo. 843 843 * 844 844 * @since 4.5.0 845 845 * 846 846 * @param int $blog_id Optional. ID of the blog in question. Default current blog. 847 * @return bool Whether the site has a sitelogo or not.847 * @return bool Whether the site has a custom logo or not. 848 848 */ 849 function has_ site_logo( $blog_id = 0 ) {849 function has_custom_logo( $blog_id = 0 ) { 850 850 if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) { 851 851 switch_to_blog( $blog_id ); 852 852 } 853 853 854 $ site_logo_id = get_theme_mod( 'site_logo' );854 $custom_logo_id = get_theme_mod( 'custom-logo' ); 855 855 856 856 if ( is_multisite() && ms_is_switched() ) { 857 857 restore_current_blog(); 858 858 } 859 859 860 return (bool) $ site_logo_id;860 return (bool) $custom_logo_id; 861 861 } 862 862 863 863 /** 864 * Returns a Site Logo, linked to home.864 * Returns a custom logo, linked to home. 865 865 * 866 866 * @since 4.5.0 867 867 * 868 868 * @param int $blog_id Optional. ID of the blog in question. Default current blog. 869 * @return string Sitelogo markup.869 * @return string Custom logo markup. 870 870 */ 871 function get_ the_site_logo( $blog_id = 0 ) {871 function get_custom_logo( $blog_id = 0 ) { 872 872 $html = ''; 873 873 874 874 if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) { 875 875 switch_to_blog( $blog_id ); 876 876 } 877 877 878 $ site_logo_id = get_theme_mod( 'site_logo' );878 $custom_logo_id = get_theme_mod( 'custom-logo' ); 879 879 880 880 if ( is_multisite() && ms_is_switched() ) { 881 881 restore_current_blog(); 882 882 } 883 $size = get_theme_support( ' site-logo' );883 $size = get_theme_support( 'custom-logo' ); 884 884 $size = $size[0]['size']; 885 885 886 886 // We have a logo. Logo is go. 887 if ( $ site_logo_id ) {888 $html = sprintf( '<a href="%1$s" class=" site-logo-link" rel="home" itemprop="url">%2$s</a>',887 if ( $custom_logo_id ) { 888 $html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>', 889 889 esc_url( home_url( '/' ) ), 890 wp_get_attachment_image( $ site_logo_id, $size, false, array(891 'class' => " site-logo attachment-$size",890 wp_get_attachment_image( $custom_logo_id, $size, false, array( 891 'class' => "custom-logo attachment-$size", 892 892 'data-size' => $size, 893 893 'itemprop' => 'logo', 894 894 ) ) … … 897 897 898 898 // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview). 899 899 elseif ( is_customize_preview() ) { 900 $html = sprintf( '<a href="%1$s" class=" site-logo-link" style="display:none;"><img class="site-logo" data-size="%2$s" /></a>',900 $html = sprintf( '<a href="%1$s" class="custom-logo-link" style="display:none;"><img class="custom-logo" data-size="%2$s" /></a>', 901 901 esc_url( home_url( '/' ) ), 902 902 esc_attr( $size ) 903 903 ); 904 904 } 905 905 906 906 /** 907 * Filter the Site Logo output.907 * Filter the custom logo output. 908 908 * 909 909 * @since 4.5.0 910 910 * 911 * @param string $html Site Logo HTML output.911 * @param string $html Custom logo HTML output. 912 912 * @param string $size Size specified in add_theme_support declaration, or 'thumbnail' default. 913 913 */ 914 return apply_filters( 'get_ the_site_logo', $html, $size );914 return apply_filters( 'get_custom_logo', $html, $size ); 915 915 } 916 916 917 917 /** 918 * Displays a Site Logo, linked to home.918 * Displays a custom logo, linked to home. 919 919 * 920 920 * @since 4.5.0 921 921 * 922 922 * @param int $blog_id Optional. ID of the blog in question. Default current blog. 923 923 */ 924 function the_ site_logo( $blog_id = 0 ) {925 echo get_ the_site_logo( $blog_id );924 function the_custom_logo( $blog_id = 0 ) { 925 echo get_custom_logo( $blog_id ); 926 926 } 927 927 928 928 /** -
src/wp-includes/js/customize-preview.js
224 224 }); 225 225 226 226 /** 227 * SiteLogo227 * Custom Logo 228 228 * 229 * The sitelogo setting only contains the attachment ID. To avoid having to send an AJAX request to get more229 * The custom logo setting only contains the attachment ID. To avoid having to send an AJAX request to get more 230 230 * data, we send a separate message with the attachment data we get from the Customizer's media modal. 231 231 * Therefore first callback handles only the event of a new logo being selected. 232 232 * … … 234 234 * 235 235 * @since 4.5.0 236 236 */ 237 api.preview.bind( ' site-logo-attachment-data', function( attachment ) {238 var $logo = $( '. site-logo' ),237 api.preview.bind( 'custom-logo-attachment-data', function( attachment ) { 238 var $logo = $( '.custom-logo' ), 239 239 size = $logo.data( 'size' ), 240 240 srcset = []; 241 241 … … 255 255 srcset: srcset 256 256 } ); 257 257 258 $( '. site-logo-link' ).show();259 $( 'body' ).addClass( ' wp-site-logo' );258 $( '.custom-logo-link' ).show(); 259 $( 'body' ).addClass( 'custom-logo' ); 260 260 } ); 261 261 262 api( ' site_logo', function( setting ) {262 api( 'custom_logo', function( setting ) { 263 263 setting.bind( function( newValue ) { 264 264 if ( ! newValue ) { 265 $( '. site-logo-link' ).hide();266 $( 'body' ).removeClass( ' wp-site-logo' );265 $( '.custom-logo-link' ).hide(); 266 $( 'body' ).removeClass( 'custom-logo' ); 267 267 } 268 268 } ); 269 269 270 // Focus on the control when the logo is clicked, if there is no site_logo partial.271 if ( ! api.selectiveRefresh || ! api.selectiveRefresh.partial.has( ' site_logo' ) ) {272 $( document.body ).on( 'click', '. site-logo-link', function( e ) {270 // Focus on the control when the logo is clicked, if there is no custom_logo partial. 271 if ( ! api.selectiveRefresh || ! api.selectiveRefresh.partial.has( 'custom_logo' ) ) { 272 $( document.body ).on( 'click', '.custom-logo-link', function( e ) { 273 273 if ( ! e.shiftKey ) { 274 274 return; 275 275 } 276 api.preview.send( 'focus-control-for-setting', ' site_logo' );276 api.preview.send( 'focus-control-for-setting', 'custom_logo' ); 277 277 } ); 278 $( '. site-logo-link' ).attr( 'title', api.settings.l10n.shiftClickToEdit );278 $( '.custom-logo-link' ).attr( 'title', api.settings.l10n.shiftClickToEdit ); 279 279 } 280 280 } ); 281 281 -
src/wp-includes/post-template.php
706 706 if ( get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) || get_background_image() ) 707 707 $classes[] = 'custom-background'; 708 708 709 if ( has_ site_logo() ) {710 $classes[] = ' wp-site-logo';709 if ( has_custom_logo() ) { 710 $classes[] = 'custom-logo'; 711 711 } 712 712 713 713 $page = $wp_query->get( 'page' );