true), 'objects'); $excluded_post_types = array('attachment', 'revision', 'nav_menu_item', 'wp_block', 'wp_template', 'wp_template_part', 'wp_navigation'); $enabled_post_types = igny8_get_enabled_post_types(); $default_post_status = get_option('igny8_default_post_status', 'draft'); $sync_enabled = get_option('igny8_sync_enabled', 1); // Get enabled taxonomies $enabled_taxonomies = igny8_get_enabled_taxonomies(); // Filter out system post types $public_post_types = array(); foreach ($all_post_types as $pt) { if (!in_array($pt->name, $excluded_post_types, true)) { $public_post_types[$pt->name] = $pt; } } ?>

Plugin v PHP

$pt) : $is_posts = ($slug === 'post'); $is_enabled = in_array($slug, $enabled_post_types, true); ?>

$pt) : $is_posts = ($slug === 'post'); $is_enabled = in_array($slug, $enabled_post_types, true); $taxonomies = get_object_taxonomies($slug, 'objects'); // Filter out system taxonomies $public_taxonomies = array(); foreach ($taxonomies as $tax) { if ($tax->public && !in_array($tax->name, array('post_format', 'wp_theme'), true)) { $public_taxonomies[$tax->name] = $tax; } } // Skip if no public taxonomies if (empty($public_taxonomies)) continue; // Add IGNY8 taxonomies if they exist if (taxonomy_exists('igny8_sectors')) { $public_taxonomies['igny8_sectors'] = get_taxonomy('igny8_sectors'); } if (taxonomy_exists('igny8_clusters')) { $public_taxonomies['igny8_clusters'] = get_taxonomy('igny8_clusters'); } ?>

📝 📦 📄 📁 label)); ?>

$tax) : $is_tax_enabled = in_array($tax_slug, $enabled_taxonomies, true); ?>