/*
Theme Name: Aramco
Theme URI: http://demo.casethemes.net/aramco
Author: Case-Themes
Author URI: https://casethemes.net/
Description: **Introducing Aramco – Physical Therapy & Physiotherapy WordPress Theme**   Experience the future of rehabilitation with Aramco. This cutting-edge approach combines AI-driven techniques with expert therapy to optimize recovery, improve mobility, and enhance overall well-being.
Version: 1.0.0
Requires PHP: 7.4
Tested up to: 6.0
License: ThemeForest
License URI: https://themeforest.net/licenses
Text Domain: aramco
Copyright (c) 2025 Case-Themes. All rights reserved.
This theme is licensed under the GPL-2.0+ license.
Tags:  	chiropractor, clinic, dentist, doctor, healthcare, medical, orthopedic, pharmacy, physical therapy, physiotherapy, psychologist, rehab, rehabilitation, sport, wellness 
*/
<?php
/**
 * Theme functions: init, enqueue scripts and styles, include required files and widgets.
 *
 * @package Case-Themes
 * @since Aramco 1.0
 */

if(!defined('DEV_MODE')){ define('DEV_MODE', true); }

if(!defined('THEME_DEV_MODE_ELEMENTS') && is_user_logged_in()){
    define('THEME_DEV_MODE_ELEMENTS', true);
}
 
require_once get_template_directory() . '/inc/classes/class-main.php';

if ( is_admin() ){ 
	require_once get_template_directory() . '/inc/admin/admin-init.php'; }
 
/**
 * Theme Require
*/
aramco()->require_folder('inc');
aramco()->require_folder('inc/classes');
aramco()->require_folder('inc/theme-options');
aramco()->require_folder('template-parts/widgets');
if(class_exists('Woocommerce')){
    aramco()->require_folder('woocommerce');
}


// Ajouter GTranslate à la fin du menu principal
function add_gtranslate_to_menu($items, $args) {
    // Remplace 'primary' par l'emplacement de ton menu (ex: main, header, etc.)
    if ($args->theme_location == 'primary') {
        $items .= '<li class="menu-item gtranslate-menu">' . do_shortcode('[gtranslate]') . '</li>';
    }
    return $items;
}
add_filter('wp_nav_menu_items', 'add_gtranslate_to_menu', 10, 2);
