Index: src/wp-admin/includes/admin.php
===================================================================
--- src/wp-admin/includes/admin.php	(revision 36908)
+++ src/wp-admin/includes/admin.php	(working copy)
@@ -72,9 +72,6 @@
 /** WordPress Site Icon API */
 require_once(ABSPATH . 'wp-admin/includes/class-wp-site-icon.php');
 
-/** WordPress Custom Logo API */
-require_once(ABSPATH . 'wp-admin/includes/class-wp-custom-logo.php');
-
 /** WordPress Update Administration API */
 require_once(ABSPATH . 'wp-admin/includes/update.php');
 
Index: src/wp-admin/includes/class-wp-custom-logo.php
===================================================================
--- src/wp-admin/includes/class-wp-custom-logo.php	(revision 36908)
+++ src/wp-admin/includes/class-wp-custom-logo.php	(working copy)
@@ -1,109 +0,0 @@
-<?php
-/**
- * Administration API: WP_Custom_Logo class
- *
- * @package WordPress
- * @subpackage Administration
- * @since 4.5.0
- */
-
-/**
- * Core class used to implement custom logo functionality.
- *
- * @since 4.5.0
- */
-class WP_Custom_Logo {
-
-	/**
-	 * Get current logo settings stored in theme mod.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 */
-	public function __construct() {
-		add_action( 'wp_head', array( $this, 'head_text_styles' ) );
-		add_action( 'delete_attachment', array( $this, 'delete_attachment_data' ) );
-	}
-
-	/**
-	 * Hides header text on the front end if necessary.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 */
-	public function head_text_styles() {
-		// Bail if our theme supports custom headers.
-		if ( current_theme_supports( 'custom-header' ) || get_theme_mod( 'custom_logo_header_text', true ) ) {
-			return;
-		}
-
-		// Is Display Header Text unchecked? If so, hide the header text.
-		?>
-		<!-- Custom Logo: hide header text -->
-		<style type="text/css">
-			<?php echo sanitize_html_class( $this->header_text_classes() ); ?>  {
-				position: absolute;
-				clip: rect(1px, 1px, 1px, 1px);
-			}
-		</style>
-		<?php
-	}
-
-	/**
-	 * Reset the custom logo if the current logo is deleted in the media manager.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 *
-	 * @param int $post_id Post ID.
-	 */
-	public function delete_attachment_data( $post_id ) {
-		$custom_logo_id = get_theme_mod( 'custom_logo' );
-
-		if ( $custom_logo_id && $custom_logo_id == $post_id ) {
-			remove_theme_mod( 'custom_logo' );
-		}
-	}
-
-	/**
-	 * Retrieves the header text classes.
-	 *
-	 * If not defined in add_theme_support(), defaults from Underscores will be used.
-	 *
-	 * @since 4.5.0
-	 * @access protected
-	 *
-	 * @return string String of classes to hide.
-	 */
-	protected function header_text_classes() {
-		$args = get_theme_support( 'custom-logo' );
-
-		if ( isset( $args[0]['header-text'] ) ) {
-			// Use any classes defined in add_theme_support().
-			$classes = $args[0]['header-text'];
-		} else {
-			// Otherwise, use these defaults, which will work with any Underscores-based theme.
-			$classes = array(
-				'site-title',
-				'site-description',
-			);
-		}
-
-		// If there's an array of classes, reduce them to a string for output.
-		if ( is_array( $classes ) ) {
-			$classes = array_map( 'sanitize_html_class', $classes );
-			$classes = (string) '.' . implode( ', .', $classes );
-		} else {
-			$classes = (string) '.' . $classes;
-		}
-
-		return $classes;
-	}
-}
-
-/**
- * WP_Custom_Logo instance.
- *
- * @global WP_Custom_Logo $wp_custom_logo
- */
-$GLOBALS['wp_custom_logo'] = new WP_Custom_Logo;
Index: src/wp-includes/class-wp-customize-manager.php
===================================================================
--- src/wp-includes/class-wp-customize-manager.php	(revision 36912)
+++ src/wp-includes/class-wp-customize-manager.php	(working copy)
@@ -1922,13 +1922,12 @@
 			'section'    => 'title_tagline',
 		) );
 
-		// Add a setting to hide header text if the theme isn't supporting the feature itself.
-		// @todo
-		if ( ! current_theme_supports( 'custom-header' ) ) {
+		// Add a setting to hide header text if the theme doesn't support custom headers.
+		if ( ! current_theme_supports( 'custom-header', 'header-text' ) ) {
 			$this->add_setting( 'header_text', array(
+				'theme_supports'    => array( 'custom-logo', 'header-text' ),
 				'default'           => 1,
 				'sanitize_callback' => 'absint',
-				'transport'         => 'postMessage',
 			) );
 
 			$this->add_control( 'header_text', array(
Index: src/wp-includes/default-filters.php
===================================================================
--- src/wp-includes/default-filters.php	(revision 36908)
+++ src/wp-includes/default-filters.php	(working copy)
@@ -371,6 +371,7 @@
  */
 // Theme
 add_action( 'wp_loaded', '_custom_header_background_just_in_time' );
+add_action( 'wp_head', '_custom_logo_just_in_time' );
 add_action( 'plugins_loaded', '_wp_customize_include' );
 add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );
 add_action( 'delete_attachment', '_delete_attachment_theme_mod' );
Index: src/wp-includes/general-template.php
===================================================================
--- src/wp-includes/general-template.php	(revision 36908)
+++ src/wp-includes/general-template.php	(working copy)
@@ -880,8 +880,7 @@
 	if ( is_multisite() && ms_is_switched() ) {
 		restore_current_blog();
 	}
-	$size = get_theme_support( 'custom-logo' );
-	$size = $size[0]['size'];
+	$size = get_theme_support( 'custom-logo', 'size' );
 
 	// We have a logo. Logo is go.
 	if ( $custom_logo_id ) {
Index: src/wp-includes/theme.php
===================================================================
--- src/wp-includes/theme.php	(revision 36909)
+++ src/wp-includes/theme.php	(working copy)
@@ -1732,6 +1732,30 @@
 }
 
 /**
+ * Registers the internal custom header and background routines.
+ *
+ * @since 4.5.0
+ * @access private
+ */
+function _custom_logo_just_in_time() {
+	if ( ! current_theme_supports( 'custom-header' ) && get_theme_support( 'custom-logo', 'header-text' ) && ! get_theme_mod( 'header_text', true ) ) {
+		$classes = (array) get_theme_support( 'custom-logo', 'header-text' );
+		$classes = array_map( 'sanitize_html_class', $classes );
+		$classes = '.' . implode( ', .', $classes );
+
+		?>
+		<!-- Custom Logo: hide header text -->
+		<style type="text/css">
+			<?php echo $classes; ?> {
+				position: absolute;
+				clip: rect(1px, 1px, 1px, 1px);
+			}
+		</style>
+	<?php
+	}
+}
+
+/**
  * Gets the theme support arguments passed when registering that support
  *
  * @since 3.1.0
@@ -1927,6 +1951,7 @@
  * @access private
  * @since 3.0.0
  * @since 4.3.0 Also removes `header_image_data`.
+ * @since 4.5.0 Also removes custom logo theme mods.
  *
  * @param int $id The attachment id.
  */
@@ -1934,6 +1959,12 @@
 	$attachment_image = wp_get_attachment_url( $id );
 	$header_image     = get_header_image();
 	$background_image = get_background_image();
+	$custom_logo_id   = get_theme_mod( 'custom_logo' );
+
+	if ( $custom_logo_id && $custom_logo_id == $id ) {
+		remove_theme_mod( 'custom_logo' );
+		remove_theme_mod( 'header_text' );
+	}
 
 	if ( $header_image && $header_image == $attachment_image ) {
 		remove_theme_mod( 'header_image' );
