<?php
/*
 * All the function related to customizer
 *
 * @package Godhuli
 */


/**
 * Text logo if no image logo is selected
 */
if ( ! function_exists( 'godhuli_text_logo_display' ) ) :

	function godhuli_text_logo_display() {

		$markup  = '<a class="navbar-logo" href="' . esc_url( home_url( '/' ) ) . '">';
		$markup .= '<h1 class="site-title">' . esc_html( get_bloginfo( 'name' ) ) . '</h1>';
		$markup .= '</a>';
		if ( ( get_theme_mod( 'header_text' ) !== 0 ) && ( get_bloginfo( 'description' ) !== '' ) ) {
			$markup .= '<p class="site-description">' . esc_html( get_bloginfo( 'description' ) ) . '</p>';
		}

		return $markup;
	}

endif;

/*
 * Get the custom image logo using the WordPress core function.
 */

if ( ! function_exists( 'godhuli_custom_logo' ) ) :

	/**
	 * Returns custom logo markup using the WP core get_custom_logo() API or null.
	 *
	 * @return string|false Custom logo HTML or false if not set.
	 */
	function godhuli_custom_logo() {

		if ( has_custom_logo() ) {
			return get_custom_logo();
		}

		return false;
	}

endif;
