<?php

if ( ! function_exists( 'mohi_theme_setup' ) ) :

    function mohi_theme_setup() {

         // Load theme textdomain for translations
        load_theme_textdomain( 'mohi', get_template_directory() . '/lang' );

        // Add default posts and comments RSS feed links to <head>
        add_theme_support( 'automatic-feed-links' );

        // Enable support for document title tag
        add_theme_support( 'title-tag' );

        // Enable support for post thumbnails
        add_theme_support( 'post-thumbnails' );

        // Enable HTML5 markup for forms, comments, galleries, captions
        add_theme_support( 'html5', array(
            'search-form',
            'comment-form',
            'comment-list',
            'gallery',
            'caption',
        ) );

        // Enable custom logo support
        add_theme_support( 'custom-logo', array(
            'height'               => 60,
            'width'                => 200,
            'flex-height'          => true,
            'flex-width'           => true,
            'header-text'          => array( 'site-title', 'site-description' ),
            'unlink-homepage-logo' => true,
        ) );

        // Enable widget support
        add_theme_support( 'widgets' );
        remove_theme_support( 'widgets-block-editor' );

        // Register navigation menus
        register_nav_menus( array(
            'primary-menu' => __( 'Primary Menu', 'mohi' ),
            'footer-menu'  => __( 'Footer Menu', 'mohi' ),
        ) );

    }

endif;
add_action( 'after_setup_theme', 'mohi_theme_setup' );
