Changeset 36837 for trunk/src/wp-admin/includes/class-wp-site-logo.php
- Timestamp:
- 03/03/2016 07:55:15 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-site-logo.php
r36820 r36837 1 1 <?php 2 2 /** 3 * Administration API: WP_ Site_Logo class3 * Administration API: WP_Custom_Logo class 4 4 * 5 5 * @package WordPress … … 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 /** … … 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 } … … 41 41 // Is Display Header Text unchecked? If so, hide the 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() ); ?> { … … 52 52 53 53 /** 54 * Reset s 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 … … 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 } … … 106 106 */ 107 107 protected function header_text_classes() { 108 $args = get_theme_support( ' site-logo' );108 $args = get_theme_support( 'custom-logo' ); 109 109 110 110 if ( isset( $args[0]['header-text'] ) ) { … … 132 132 133 133 /** 134 * WP_ Site_Logo instance.134 * WP_Custom_Logo instance. 135 135 * 136 * @global WP_ Site_Logo $wp_site_logo136 * @global WP_Custom_Logo $wp_custom_logo 137 137 */ 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.