<?php
/**
 * ismoderna functions and definitions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package ismoderna
 */
// Initialize Theme
require get_template_directory() . '/inc/theme-setup.php';

/**
 * Implement the Custom Header feature.
 */
require get_template_directory() . '/inc/custom-header.php';

/**
 * Custom template tags for this theme.
 */
require get_template_directory() . '/inc/template-tags.php';

/**
 * Functions which enhance the theme by hooking into WordPress.
 */
require get_template_directory() . '/inc/template-functions.php';





// Register Sidebars (Widget Areas)
if ( ! function_exists( 'ismoderna_widgets_init' ) ) {
    function ismoderna_widgets_init() {
        // Register Footer Widget Area 1
        register_sidebar( array(
            'name'          => __( 'Footer Widget Area 1', 'ismoderna' ),
            'id'            => 'footer-widget-area-1', // Unique ID for the footer widget area 1
            'description'   => __( 'Footer Widget Area 1', 'ismoderna' ),
            'before_widget' => '<div id="%1$s" class="col-md-3 col-sm-6 footer-widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<div class="col-md-12 widget-heading"><h1>',
            'after_title'   => '</h1></div>',
        ) );

        // Register Footer Widget Area 2
        register_sidebar( array(
            'name'          => __( 'Footer Widget Area 2', 'ismoderna' ),
            'id'            => 'footer-widget-area-2', // Unique ID for the footer widget area 2
            'description'   => __( 'Footer Widget Area 2', 'ismoderna' ),
            'before_widget' => '<div id="%1$s" class="col-md-3 col-sm-6 footer-widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<div class="col-md-12 widget-heading"><h1>',
            'after_title'   => '</h1></div>',
        ) );

        // Register Footer Widget Area 3
        register_sidebar( array(
            'name'          => __( 'Footer Widget Area 3', 'ismoderna' ),
            'id'            => 'footer-widget-area-3', // Unique ID for the footer widget area 3
            'description'   => __( 'Footer Widget Area 3', 'ismoderna' ),
            'before_widget' => '<div id="%1$s" class="col-md-3 col-sm-6 footer-widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<div class="col-md-12 widget-heading"><h1>',
            'after_title'   => '</h1></div>',
        ) );

        // Register Footer Widget Area 4
        register_sidebar( array(
            'name'          => __( 'Footer Widget Area 4', 'ismoderna' ),
            'id'            => 'footer-widget-area-4', // Unique ID for the footer widget area 4
            'description'   => __( 'Footer Widget Area 4', 'ismoderna' ),
            'before_widget' => '<div id="%1$s" class="col-md-3 col-sm-6 footer-widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<div class="col-md-12 widget-heading"><h1>',
            'after_title'   => '</h1></div>',
        ) );
    }
    add_action( 'widgets_init', 'ismoderna_widgets_init' );
}




/**
 * Customizer additions.
 */
require get_template_directory() . '/inc/customizer.php';

//Navwalker.
require get_template_directory() . '/inc/ismoderna_custom_nav_walker.php';

if ( is_admin() ) {
	require_once('core/admin/admin-themes.php');
}
































