<?php
echo '<div class="' . hit_apply_atomic( 'title_area_class', 'title-area') .'">';

/* Get the site title.  If it's not empty, wrap it with the appropriate HTML. */	
if ( $title = get_bloginfo( 'name' ) ) {		
	if ( function_exists( 'the_custom_logo' ) && get_custom_logo() ) {			
		$title = sprintf( '<div itemscope itemtype="http://schema.org/Organization" class="site-title"><a itemprop="url" href="%1$s" title="%2$s" rel="home">'.get_custom_logo().'</a></div>', home_url(), esc_attr( $title ));		
	} else {
		if (is_home()) {
			$title = sprintf( '<h1 class="site-title" itemprop="headline"><a href="%1$s" title="%2$s" rel="home">%3$s</a></h1>', home_url(), esc_attr( $title ), $title );		
		} else {
			$title = sprintf( '<div class="site-title" itemprop="headline"><a href="%1$s" title="%2$s" rel="home">%3$s</a></div>', home_url(), esc_attr( $title ), $title );		
		}
	}
}

/* Display the site title and apply filters for developers to overwrite. */
echo hit_apply_atomic( 'site_title', $title );	

echo '</div>';
?>	