<?php   
/**
 * @package eatingplace
 */
 ?>
 <?php
 if ( ! function_exists( 'eatingplace_setup' ) ) :
function eatingplace_setup() {   
	add_theme_support( 'automatic-feed-links' );
	add_theme_support('woocommerce');
	add_theme_support( 'post-thumbnails' );
	add_theme_support( 'custom-header' );
	add_theme_support( 'title-tag' );
	register_nav_menus( array(
		'primary' => esc_html__( 'Primary Menu', 'eatingplace' ),
		'footer' => esc_html__( 'Footer Menu', 'eatingplace' ),
	) );

	 $defaults = array(
            'default-image'      => get_template_directory_uri() . '/images/banner2.jpg',
            'default-text-color' => 'ffffff',
            'width'              => 1400,
            'height'             => 500,
            'uploads'            => true,
            'wp-head-callback'   => 'eatingplace_header_style',
        );
        add_theme_support('custom-header', $defaults);

	add_theme_support( 'custom-background', array(
		'default-color' => 'ffffff'
	) );

	add_theme_support( 'wp-block-styles' );
	add_theme_support( 'responsive-embeds' );
	add_theme_support( 'align-wide' );

	add_theme_support( 'custom-logo', array(
		'height'      => 100,
		'width'       => 400,
		'flex-height' => true,
		'flex-width'  => true,
	) );

	add_theme_support( 'html5', array(
		'search-form',
		'comment-form',
		'comment-list',
		'gallery',
		'caption',
		'style',
		'script',
	) );

	add_editor_style();
} 
endif; // eatingplace_setup
add_action( 'after_setup_theme', 'eatingplace_setup' );

//logo header style
function eatingplace_header_style() {
    $eatingplace_header_text_color = get_header_textcolor();
    if (get_theme_support('custom-header', 'default-text-color') === $eatingplace_header_text_color) {
        return;
    }
    echo '<style id="eatingplace-custom-header-styles" type="text/css">';
    if ('blank' !== $eatingplace_header_text_color) {
        echo '.logotxt, .logotxt a
			 {
				color: #' . esc_attr($eatingplace_header_text_color) . '
			}';
    }
    echo '</style>';
}
?>