

// JS Defer - Render engellemeyi kaldır
add_filter("script_loader_tag", "maksi_js_defer_ekle", 10, 3);
function maksi_js_defer_ekle($tag, $handle, $src) {
    if (is_admin()) return $tag;
    $haric_tut = array("jquery-core", "jquery-migrate", "jquery");
    if (in_array($handle, $haric_tut)) return $tag;
    if (strpos($tag, "defer") !== false || strpos($tag, "async") !== false) return $tag;
    return str_replace("<script ", "<script defer ", $tag);
}

// DNS Prefetch - Önceden bağlantı kur
add_action("wp_head", "maksi_dns_prefetch", 1);
function maksi_dns_prefetch() {
    $alanlar = array(
        "//fonts.googleapis.com",
        "//fonts.gstatic.com",
        "//www.googletagmanager.com"
    );
    foreach($alanlar as $alan) {
        echo '<link rel="dns-prefetch" href="' . esc_url($alan) . '">' . "\n";
        echo '<link rel="preconnect" href="' . esc_url($alan) . '" crossorigin>' . "\n";
    }
}

// Emoji devre dışı bırak
add_action("init", "maksi_emoji_kaldir");
function maksi_emoji_kaldir() {
    remove_action("wp_head", "print_emoji_detection_script", 7);
    remove_action("admin_print_scripts", "print_emoji_detection_script");
    remove_action("wp_print_styles", "print_emoji_styles");
    remove_action("admin_print_styles", "print_emoji_styles");
}

// Heartbeat ön yüzde devre dışı bırak
add_action("init", "maksi_heartbeat_kontrol", 1);
function maksi_heartbeat_kontrol() {
    if (!is_admin()) {
        wp_deregister_script("heartbeat");
    }
}
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//maksimotor.com/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://maksimotor.com/page-sitemap.xml</loc>
		<lastmod>2026-03-09T18:23:57+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://maksimotor.com/local-sitemap.xml</loc>
		<lastmod>2026-04-23T10:09:31+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Rank Math SEO Plugin (c) Rank Math - rankmath.com -->