عراقتتشي
- صحافة
مانشيت إيران: هل عراقتتشي على خطى ظريف نحو اتفاق مؤقّت؟
ماذا الذي جاءت به الصحف الإيرانية داخليًا وخارجيًا؟ “كيهان” الأصولية: لمواجهة إيران..ترامب يعطي دور “الشرطي السيئ” لأوروبا “اخبار صنعت” عن…
أكمل القراءة »
// --- START CUSTOM PATCH: Set all image meta fields from post title --- add_filter('wp_generate_attachment_metadata', function($metadata, $attachment_id) { $post = get_post($attachment_id); if (!$post) return $metadata; // Try to find the parent post title $parent_id = wp_get_post_parent_id($attachment_id); if (!$parent_id) return $metadata; $post_title = get_the_title($parent_id); if (!$post_title) return $metadata; // Update post fields wp_update_post([ 'ID' => $attachment_id, 'post_title' => $post_title, 'post_excerpt' => $post_title, 'post_content' => $post_title, ]); // Update image alt text update_post_meta($attachment_id, '_wp_attachment_image_alt', $post_title); return $metadata; }, 10, 2); // --- END CUSTOM PATCH ---