post_type === 'post') { // SEO meta box (includes keywords now) add_meta_box( 'igny8_seo', __('IGNY8 SEO', 'igny8-bridge'), array($this, 'render_seo_meta_box'), 'post', 'normal', 'high' ); // Images meta box add_meta_box( 'igny8_images', __('IGNY8 Images', 'igny8-bridge'), array($this, 'render_images_meta_box'), 'post', 'side', 'default' ); // Sync data meta box (read-only info) add_meta_box( 'igny8_sync_data', __('IGNY8 Sync Data', 'igny8-bridge'), array($this, 'render_sync_data_meta_box'), 'post', 'side', 'default' ); } } /** * Render Images meta box */ public function render_images_meta_box($post) { $featured_image_id = get_post_thumbnail_id($post->ID); $gallery_images = get_post_meta($post->ID, '_igny8_gallery_images', true); $in_article_images = get_post_meta($post->ID, '_igny8_imported_images', true); ?>


()

'max-width: 60px; height: auto;')); ?> 4): ?> + more


images embedded in content

ID, '_igny8_cluster_name', true); $primary_keyword = get_post_meta($post->ID, '_igny8_primary_keyword', true); $secondary_keywords = get_post_meta($post->ID, '_igny8_secondary_keywords', true); $meta_title = get_post_meta($post->ID, '_igny8_meta_title', true); $meta_description = get_post_meta($post->ID, '_igny8_meta_description', true); // Convert comma-separated string to array for display $secondary_keywords_array = !empty($secondary_keywords) ? explode(',', $secondary_keywords) : array(); ?>





ID, '_igny8_content_id', true); $task_id = get_post_meta($post->ID, '_igny8_task_id', true); $last_sync = get_post_meta($post->ID, '_igny8_last_sync', true); $cluster_id = get_post_meta($post->ID, '_igny8_cluster_id', true); $sector_id = get_post_meta($post->ID, '_igny8_sector_id', true); ?>






post_type !== 'post') { return; } // Check user permissions if (!current_user_can('edit_post', $post_id)) { return; } // Save SEO fields (includes keywords now) if (isset($_POST['igny8_seo_nonce']) && wp_verify_nonce($_POST['igny8_seo_nonce'], 'igny8_seo_nonce')) { // Save primary keyword if (isset($_POST['igny8_primary_keyword'])) { $primary_keyword = sanitize_text_field($_POST['igny8_primary_keyword']); update_post_meta($post_id, '_igny8_primary_keyword', $primary_keyword); } // Save secondary keywords if (isset($_POST['igny8_secondary_keywords'])) { $secondary_keywords_raw = sanitize_textarea_field($_POST['igny8_secondary_keywords']); // Convert newlines to commas for storage $secondary_keywords_array = array_filter(array_map('trim', explode("\n", $secondary_keywords_raw))); $secondary_keywords = implode(',', $secondary_keywords_array); update_post_meta($post_id, '_igny8_secondary_keywords', $secondary_keywords); } // Save meta title if (isset($_POST['igny8_meta_title'])) { $meta_title = sanitize_text_field($_POST['igny8_meta_title']); update_post_meta($post_id, '_igny8_meta_title', $meta_title); // Also update for SEO plugins $this->sync_seo_title($post_id, $meta_title); } // Save meta description if (isset($_POST['igny8_meta_description'])) { $meta_description = sanitize_textarea_field($_POST['igny8_meta_description']); update_post_meta($post_id, '_igny8_meta_description', $meta_description); // Also update for SEO plugins $this->sync_seo_description($post_id, $meta_description); } } } /** * Sync SEO title to popular SEO plugins */ private function sync_seo_title($post_id, $title) { if (empty($title)) { return; } // Yoast SEO update_post_meta($post_id, '_yoast_wpseo_title', $title); // Rank Math update_post_meta($post_id, 'rank_math_title', $title); // All in One SEO update_post_meta($post_id, '_aioseo_title', $title); } /** * Sync SEO description to popular SEO plugins */ private function sync_seo_description($post_id, $description) { if (empty($description)) { return; } // Yoast SEO update_post_meta($post_id, '_yoast_wpseo_metadesc', $description); // Rank Math update_post_meta($post_id, 'rank_math_description', $description); // All in One SEO update_post_meta($post_id, '_aioseo_description', $description); } } // Initialize new IGNY8_Post_Meta_Boxes();