<script>
window.onload = function() {
    // 1. التعامل مع زر النشر
    var pubBtns = document.querySelectorAll('button[name="publish_single"]');
    pubBtns.forEach(function(btn) {
        btn.onclick = function(e) {
            e.preventDefault();
            this.innerText = "جاري المعالجة...";
            
            // نستخدم FormData لإرسال طلب النشر الحقيقي
            var formData = new FormData();
            formData.append('publish_single', this.value);
            
            fetch(window.location.href, {
                method: 'POST',
                body: formData
            }).then(function(response) {
                btn.innerText = "✅ تم النشر بنجاح";
                btn.style.background = "#28a745";
                btn.closest('.ahram-viewer').style.opacity = "0.3";
            });
        };
    });

    // 2. التعامل مع زر رفع الصورة (إذا كان متاحاً)
    var uploadInputs = document.querySelectorAll('input[type="file"]');
    uploadInputs.forEach(function(input) {
        input.onchange = function() {
            var formData = new FormData();
            formData.append('file', this.files[0]);
            // هنا يجب وضع اسم الإجراء (Action) الذي تتعامل معه الإضافة لرفع الصور
            formData.append('action', 'ahram_upload_image'); 
            
            fetch(ajaxurl, {
                method: 'POST',
                body: formData
            }).then(function(response) {
                alert("تم رفع الصورة!");
            });
        };
    });
};
</script>
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//www.ahramag.com/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://www.ahramag.com/post-sitemap.xml</loc>
		<lastmod>2026-07-08T14:26:39+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/post-sitemap2.xml</loc>
		<lastmod>2019-12-21T19:06:26+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/post-sitemap3.xml</loc>
		<lastmod>2024-01-23T18:30:46+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/post-sitemap4.xml</loc>
		<lastmod>2026-07-08T14:26:39+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/page-sitemap.xml</loc>
		<lastmod>2026-06-05T09:40:53+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/category-sitemap.xml</loc>
		<lastmod>2026-07-08T14:26:39+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/post_tag-sitemap.xml</loc>
		<lastmod>2026-07-08T14:26:39+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/post_tag-sitemap2.xml</loc>
		<lastmod>2026-07-06T16:56:48+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/post_tag-sitemap3.xml</loc>
		<lastmod>2026-07-08T14:26:39+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/post_tag-sitemap4.xml</loc>
		<lastmod>2026-07-06T16:56:48+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/post_tag-sitemap5.xml</loc>
		<lastmod>2026-07-08T14:26:39+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ahramag.com/author-sitemap.xml</loc>
		<lastmod>2026-06-10T10:57:08+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->