<?php
/**
 * Navbar branding
 *
 * @package Magazine Style
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

$show_title   = ( true === get_theme_mod( 'display_title_and_tagline', true ) );
$description  = get_bloginfo( 'description', 'display' );
$blog_info    = get_bloginfo( 'name' );
$header_class = $show_title ? 'site-title' : 'screen-reader-text';

	the_custom_logo();
 if ( $blog_info ) :
		if ( is_front_page() && is_home() ) : ?>
			<h1 class="navbar-brand mb-0 <?php echo esc_attr( $header_class ); ?>" <?php magazinestyle_do_schema( 'logo' ); ?>><?php echo esc_html( $blog_info ); ?></h1>
		<?php elseif ( is_front_page() && ! is_home() ) : ?>
			<h1 class="navbar-brand mb-0 <?php echo esc_attr( $header_class ); ?>" <?php magazinestyle_do_schema( 'logo' ); ?>><a rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" itemprop="url"><?php echo esc_html( $blog_info ); ?></a></h1>
		<?php else : ?>	
			<p class="navbar-brand mb-0 <?php echo esc_attr( $header_class ); ?>" <?php magazinestyle_do_schema( 'logo' ); ?>><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html( $blog_info ); ?></a></p>
		<?php endif; ?>
<?php endif; ?>
		<?php
		if ( $description && true === get_theme_mod( 'display_title_and_tagline', true ) ) : ?>
		<p class="site-description">
			<?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput ?>
		</p>
	<?php endif;


