<?php
/*
 * Custom Header
 * 
 * Removes default Site Logo of Pmthemes and replaces it with Site Logo Feature
 *
 */
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}
// Remove default site title
remove_action( 'pmthemes_site_title', 'pmthemes_display_site_title' );
// Display Footer Widgets on Pmthemes
add_action( 'pmthemes_site_title', 'pmthemes_display_site_logo' );
// Display Site Title
function pmthemes_display_site_logo() { 
	// Get Theme Options from Database
	$theme_options = pmthemes_theme_options();
?>
	<a href="<?php echo esc_url(home_url('/')); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">		
	<?php // Display Logo Image or Site Title
		if ( isset($theme_options['header_logo']) and $theme_options['header_logo'] <> '' ) : ?>
			<img class="site-logo" src="<?php echo esc_url($theme_options['header_logo']); ?>" alt="<?php esc_attr(bloginfo('name')); ?>" />
	<?php else: ?>
			<h1 class="site-title"><?php bloginfo('name'); ?></h1>
	<?php endif; ?>
	</a>
<?php
}
?>