Initial commit: igny8 project

This commit is contained in:
igny8
2025-11-09 10:27:02 +00:00
commit 60b8188111
27265 changed files with 4360521 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
<?php
/**
* ==============================
* 📁 Folder Scope Declaration
* ==============================
* Folder: /config/
* Purpose: Central config arrays (filters, tables, prompts)
* Rules:
* - Can be reused globally across all modules
* - Contains only configuration arrays
* - No executable code allowed
* - Must be pure data structures
* - Used by components and modules
*/

View File

@@ -0,0 +1,586 @@
<?php
/**
* ==========================
* 🔐 IGNY8 FILE RULE HEADER
* ==========================
* @file : filters-config.php
* @location : /modules/config/filters-config.php
* @type : Config Array
* @scope : Global
* @allowed : Filter definitions, search configurations
* @reusability : Globally Reusable
* @notes : Central filter configuration for all modules
*/
// Prevent direct access only if not being included
if (!defined('ABSPATH') && !defined('IGNY8_INCLUDE_CONFIG')) {
exit;
}
return [
// Keywords Filters
'planner_keywords' => [
'keyword' => [
'type' => 'search',
'placeholder' => 'Search keywords...',
'field' => 'keyword'
],
'intent' => [
'type' => 'select',
'label' => 'Intent',
'field' => 'intent',
'options' => [
'informational' => 'Informational',
'navigational' => 'Navigational',
'transactional' => 'Transactional',
'commercial' => 'Commercial'
]
],
'status' => [
'type' => 'select',
'label' => 'Status',
'field' => 'status',
'options' => [
'unmapped' => 'Unmapped',
'mapped' => 'Mapped',
'queued' => 'Queued',
'published' => 'Published'
]
],
'difficulty' => [
'type' => 'select',
'label' => 'Difficulty',
'field' => 'difficulty',
'options' => [
'Very Easy' => 'Very Easy',
'Easy' => 'Easy',
'Medium' => 'Medium',
'Hard' => 'Hard',
'Very Hard' => 'Very Hard'
]
],
'search_volume' => [
'type' => 'range',
'label' => 'Volume',
'field' => 'search_volume',
'min' => 0,
'max' => 100000
]
],
// Clusters Filters
'planner_clusters' => [
'cluster_name' => [
'type' => 'search',
'placeholder' => 'Search clusters...',
'field' => 'cluster_name'
],
'sector_id' => [
'type' => 'select',
'label' => 'Sector',
'field' => 'sector_id',
'options' => 'dynamic_sectors' // Will be loaded via AJAX
],
'status' => [
'type' => 'select',
'label' => 'Status',
'field' => 'status',
'options' => [
'active' => 'Active',
'inactive' => 'Inactive',
'archived' => 'Archived'
]
],
'keyword_count' => [
'type' => 'range',
'label' => 'Keywords Count',
'field' => 'keyword_count',
'min' => 0,
'max' => 1000
]
],
// Ideas Filters
'planner_ideas' => [
'idea_title' => [
'type' => 'search',
'placeholder' => 'Search ideas...',
'field' => 'idea_title'
],
'content_structure' => [
'type' => 'select',
'label' => 'Content Structure',
'field' => 'content_structure',
'options' => [
'cluster_hub' => 'Cluster Hub',
'landing_page' => 'Landing Page',
'guide_tutorial' => 'Guide Tutorial',
'how_to' => 'How To',
'comparison' => 'Comparison',
'review' => 'Review',
'top_listicle' => 'Top Listicle',
'question' => 'Question',
'product_description' => 'Product Description',
'service_page' => 'Service Page',
'home_page' => 'Home Page'
]
],
'source' => [
'type' => 'select',
'label' => 'Source',
'field' => 'source',
'options' => [
'AI' => 'AI',
'Manual' => 'Manual'
]
],
'status' => [
'type' => 'select',
'label' => 'Status',
'field' => 'status',
'options' => [
'new' => 'New',
'scheduled' => 'Scheduled',
'published' => 'Published'
]
],
'keyword_cluster_id' => [
'type' => 'select',
'label' => 'Cluster',
'field' => 'keyword_cluster_id',
'options' => 'dynamic_clusters'
],
'estimated_word_count' => [
'type' => 'range',
'label' => 'Word Count',
'field' => 'estimated_word_count',
'min' => 0,
'max' => 5000
]
],
// Writer Tasks Filters (Content Queue / Tasks)
'writer_tasks' => [
'title' => [
'type' => 'search',
'placeholder' => 'Search tasks...',
'field' => 'title'
],
'keywords' => [
'type' => 'search',
'placeholder' => 'Search keywords...',
'field' => 'keywords'
],
'cluster_id' => [
'type' => 'select',
'label' => 'Cluster Name',
'field' => 'cluster_id',
'options' => 'dynamic_clusters'
],
'status' => [
'type' => 'select',
'label' => 'Status',
'field' => 'status',
'options' => [
'queued' => 'Queued',
'in_progress' => 'In Progress',
'completed' => 'Completed',
'cancelled' => 'Cancelled',
'draft' => 'Draft',
'review' => 'Review',
'published' => 'Published'
]
],
'content_type' => [
'type' => 'select',
'label' => 'Content Type',
'field' => 'content_type',
'options' => [
'blog_post' => 'Blog Post',
'landing_page' => 'Landing Page',
'product_page' => 'Product Page',
'guide_tutorial' => 'Guide Tutorial',
'news_article' => 'News Article',
'review' => 'Review',
'comparison' => 'Comparison',
'email' => 'Email',
'social_media' => 'Social Media'
]
],
'created_at' => [
'type' => 'date_range',
'label' => 'Queued Date Range',
'field' => 'created_at'
]
],
// Writer Drafts Filters (Content Generated)
'writer_drafts' => [
'title' => [
'type' => 'search',
'placeholder' => 'Search drafts...',
'field' => 'title'
],
'status' => [
'type' => 'select',
'label' => 'Status',
'field' => 'status',
'options' => [
'draft' => 'Draft',
'review' => 'Review'
]
],
'content_type' => [
'type' => 'select',
'label' => 'Content Type',
'field' => 'content_type',
'options' => [
'blog_post' => 'Blog Post',
'landing_page' => 'Landing Page',
'product_page' => 'Product Page',
'guide_tutorial' => 'Guide Tutorial',
'news_article' => 'News Article',
'review' => 'Review',
'comparison' => 'Comparison',
'email' => 'Email',
'social_media' => 'Social Media'
]
],
'cluster_id' => [
'type' => 'select',
'label' => 'Cluster',
'field' => 'cluster_id',
'options' => 'dynamic_clusters'
],
'meta_status' => [
'label' => 'Meta Status',
'type' => 'select',
'options' => [
'all' => 'All',
'complete' => 'Meta Present',
'missing' => 'Meta Missing'
]
],
'keywords' => [
'label' => 'Keywords',
'type' => 'text',
'searchable' => true
]
],
// Writer Published Filters (Live Content)
'writer_published' => [
'title' => [
'type' => 'search',
'placeholder' => 'Search published content...',
'field' => 'title'
],
'status' => [
'type' => 'select',
'label' => 'Status',
'field' => 'status',
'options' => [
'published' => 'Published'
]
],
'content_type' => [
'type' => 'select',
'label' => 'Content Type',
'field' => 'content_type',
'options' => [
'blog_post' => 'Blog Post',
'landing_page' => 'Landing Page',
'product_page' => 'Product Page',
'guide_tutorial' => 'Guide Tutorial',
'news_article' => 'News Article',
'review' => 'Review',
'comparison' => 'Comparison',
'email' => 'Email',
'social_media' => 'Social Media'
]
],
'cluster_id' => [
'type' => 'select',
'label' => 'Cluster',
'field' => 'cluster_id',
'options' => 'dynamic_clusters'
],
'meta_status' => [
'label' => 'Meta Status',
'type' => 'select',
'options' => [
'all' => 'All',
'complete' => 'Meta Present',
'missing' => 'Meta Missing'
]
],
'keywords' => [
'label' => 'Keywords',
'type' => 'text',
'searchable' => true
],
'created_at' => [
'type' => 'date_range',
'label' => 'Date Range',
'field' => 'created_at'
]
],
// Optimizer Audits Filters
'optimizer_audits' => [
'page_url' => [
'type' => 'search',
'placeholder' => 'Search pages...',
'field' => 'page_url'
],
'audit_status' => [
'type' => 'select',
'label' => 'Audit Status',
'field' => 'audit_status',
'options' => [
'pending' => 'Pending',
'in_progress' => 'In Progress',
'completed' => 'Completed',
'failed' => 'Failed'
]
],
'score_range' => [
'type' => 'range',
'label' => 'SEO Score',
'field' => 'seo_score',
'min' => 0,
'max' => 100
],
'last_audit' => [
'type' => 'date_range',
'label' => 'Last Audit',
'field' => 'last_audit_date'
]
],
// Linker Backlinks Filters
'linker_backlinks' => [
'target_url' => [
'type' => 'search',
'placeholder' => 'Search target URLs...',
'field' => 'target_url'
],
'source_domain' => [
'type' => 'search',
'placeholder' => 'Search source domains...',
'field' => 'source_domain'
],
'link_type' => [
'type' => 'select',
'label' => 'Link Type',
'field' => 'link_type',
'options' => [
'dofollow' => 'DoFollow',
'nofollow' => 'NoFollow',
'sponsored' => 'Sponsored',
'ugc' => 'UGC'
]
],
'status' => [
'type' => 'select',
'label' => 'Status',
'field' => 'status',
'options' => [
'active' => 'Active',
'lost' => 'Lost',
'pending' => 'Pending'
]
],
'domain_authority' => [
'type' => 'range',
'label' => 'Domain Authority',
'field' => 'domain_authority',
'min' => 0,
'max' => 100
]
],
// Writer Templates Filters
'writer_templates' => [
'prompt_name' => [
'type' => 'search',
'placeholder' => 'Search templates...',
'field' => 'prompt_name'
],
'prompt_type' => [
'type' => 'select',
'label' => 'Category',
'field' => 'prompt_type',
'options' => [
'content' => 'Blog',
'optimization' => 'Review',
'generation' => 'Product',
'custom' => 'Custom'
]
],
'is_active' => [
'type' => 'select',
'label' => 'Status',
'field' => 'is_active',
'options' => [
'1' => 'Active',
'0' => 'Draft'
]
],
'created_at' => [
'type' => 'date_range',
'label' => 'Created Date',
'field' => 'created_at'
]
],
// Optimizer Suggestions Filters
'optimizer_suggestions' => [
'page_url' => [
'type' => 'search',
'placeholder' => 'Search pages...',
'field' => 'page_url'
],
'suggestion_type' => [
'type' => 'select',
'label' => 'Suggestion Type',
'field' => 'suggestion_type',
'options' => [
'title_optimization' => 'Title Optimization',
'meta_description' => 'Meta Description',
'heading_structure' => 'Heading Structure',
'content_improvement' => 'Content Improvement',
'internal_linking' => 'Internal Linking'
]
],
'priority' => [
'type' => 'select',
'label' => 'Priority',
'field' => 'priority',
'options' => [
'high' => 'High',
'medium' => 'Medium',
'low' => 'Low'
]
],
'status' => [
'type' => 'select',
'label' => 'Status',
'field' => 'status',
'options' => [
'pending' => 'Pending',
'in_progress' => 'In Progress',
'completed' => 'Completed',
'dismissed' => 'Dismissed'
]
],
'impact_score' => [
'type' => 'range',
'label' => 'Impact Score',
'field' => 'impact_score',
'min' => 0,
'max' => 100
]
],
// Linker Campaigns Filters
'linker_campaigns' => [
'campaign_name' => [
'type' => 'search',
'placeholder' => 'Search campaigns...',
'field' => 'campaign_name'
],
'target_url' => [
'type' => 'search',
'placeholder' => 'Search target URLs...',
'field' => 'target_url'
],
'status' => [
'type' => 'select',
'label' => 'Status',
'field' => 'status',
'options' => [
'planning' => 'Planning',
'active' => 'Active',
'paused' => 'Paused',
'completed' => 'Completed',
'cancelled' => 'Cancelled'
]
],
'completion_percentage' => [
'type' => 'range',
'label' => 'Completion %',
'field' => 'completion_percentage',
'min' => 0,
'max' => 100
],
'start_date' => [
'type' => 'date_range',
'label' => 'Start Date',
'field' => 'start_date'
]
],
// Personalize Rewrites Filters
'personalize_rewrites' => [
'personalized_content' => [
'type' => 'search',
'placeholder' => 'Search personalized content...',
'field' => 'personalized_content'
],
'field_inputs' => [
'type' => 'search',
'placeholder' => 'Search field inputs...',
'field' => 'field_inputs'
],
'post_id' => [
'type' => 'search',
'placeholder' => 'Search by post ID...',
'field' => 'post_id'
],
'created_at' => [
'type' => 'date_range',
'label' => 'Created Date',
'field' => 'created_at'
]
],
// Personalize Tones Filters
'personalize_tones' => [
'tone_name' => [
'type' => 'search',
'placeholder' => 'Search tones...',
'field' => 'tone_name'
],
'category' => [
'type' => 'select',
'label' => 'Category',
'field' => 'category',
'options' => [
'business' => 'Business',
'creative' => 'Creative',
'technical' => 'Technical',
'marketing' => 'Marketing',
'educational' => 'Educational'
]
],
'status' => [
'type' => 'select',
'label' => 'Status',
'field' => 'status',
'options' => [
'active' => 'Active',
'inactive' => 'Inactive',
'draft' => 'Draft'
]
],
'usage_count' => [
'type' => 'range',
'label' => 'Usage Count',
'field' => 'usage_count',
'min' => 0,
'max' => 1000
]
]
];

View File

@@ -0,0 +1,638 @@
<?php
/**
* ==========================
* 🔐 IGNY8 FILE RULE HEADER
* ==========================
* @file : forms-config.php
* @location : /modules/config/forms-config.php
* @type : Config Array
* @scope : Global
* @allowed : Form definitions, validation rules, field configurations
* @reusability : Globally Reusable
* @notes : Central form configuration for all modules
*/
// Prevent direct access
if (!defined('ABSPATH')) {
exit;
}
/**
* Get form configuration for a specific table
*
* @param string $table_id Table ID (e.g., 'planner_keywords')
* @return array|null Form configuration or null if not found
*/
function igny8_get_form_config($table_id) {
$form_configs = igny8_get_all_form_configs();
$GLOBALS['igny8_forms_config'] = $form_configs;
return igny8_get_dynamic_form_config($table_id);
}
/**
* Get all form configurations
*
* @return array All form configurations
*/
function igny8_get_all_form_configs() {
return [
'planner_keywords' => [
'fields' => [
[
'name' => 'keyword',
'type' => 'text',
'label' => 'Keyword',
'required' => true
],
[
'name' => 'search_volume',
'type' => 'number',
'label' => 'Search Volume',
'required' => false
],
[
'name' => 'difficulty',
'type' => 'select',
'label' => 'Difficulty',
'options' => [
'Very Easy' => 'Very Easy',
'Easy' => 'Easy',
'Medium' => 'Medium',
'Hard' => 'Hard',
'Very Hard' => 'Very Hard'
],
'required' => false
],
[
'name' => 'cpc',
'type' => 'number',
'label' => 'CPC',
'required' => false,
'step' => 0.01
],
[
'name' => 'intent',
'type' => 'select',
'label' => 'Intent',
'options' => [
'informational' => 'Informational',
'navigational' => 'Navigational',
'transactional' => 'Transactional',
'commercial' => 'Commercial'
],
'required' => false
],
[
'name' => 'status',
'type' => 'select',
'label' => 'Status',
'options' => [
'unmapped' => 'Unmapped',
'mapped' => 'Mapped',
'queued' => 'Queued',
'published' => 'Published'
],
'required' => true,
'default' => 'unmapped'
],
[
'name' => 'cluster_id',
'type' => 'select',
'label' => 'Cluster',
'source' => 'igny8_get_cluster_options',
'required' => false
]
],
'title' => 'Keyword',
'submit_text' => 'Save Keyword'
],
'planner_clusters' => [
'fields' => [
[
'name' => 'cluster_name',
'type' => 'text',
'label' => 'Cluster Name',
'required' => true
],
[
'name' => 'sector_id',
'type' => 'select',
'label' => 'Sector',
'source' => 'igny8_get_sector_options',
'required' => false
],
[
'name' => 'status',
'type' => 'select',
'label' => 'Status',
'options' => [
'active' => 'Active',
'inactive' => 'Inactive',
'archived' => 'Archived'
],
'required' => true,
'default' => 'active'
],
],
'title' => 'Cluster',
'submit_text' => 'Save Cluster'
],
'planner_ideas' => [
'fields' => [
[
'name' => 'idea_title',
'type' => 'text',
'label' => 'Idea Title',
'required' => true
],
[
'name' => 'idea_description',
'type' => 'textarea',
'label' => 'Description',
'required' => false
],
[
'name' => 'content_structure',
'type' => 'select',
'label' => 'Content Structure',
'options' => [
'cluster_hub' => 'Cluster Hub',
'landing_page' => 'Landing Page',
'guide_tutorial' => 'Guide Tutorial',
'how_to' => 'How To',
'comparison' => 'Comparison',
'review' => 'Review',
'top_listicle' => 'Top Listicle',
'question' => 'FAQ',
'product_description' => 'Product Description',
'service_page' => 'Service Page',
'home_page' => 'Home Page'
],
'required' => true,
'default' => 'cluster_hub'
],
[
'name' => 'content_type',
'type' => 'select',
'label' => 'Content Type',
'options' => [
'post' => 'Post',
'product' => 'Product',
'page' => 'Page',
'CPT' => 'Custom Post Type'
],
'required' => true,
'default' => 'post'
],
[
'name' => 'target_keywords',
'type' => 'textarea',
'label' => 'Target Keywords (comma-separated)',
'required' => false,
'placeholder' => 'Enter target keywords for this idea, separated by commas...',
'rows' => 3
],
[
'name' => 'image_prompts',
'type' => 'textarea',
'label' => 'Image Prompts (JSON)',
'required' => false,
'placeholder' => 'Enter image prompts as JSON...',
'rows' => 4,
'help_text' => 'JSON format: {"featured_image": "prompt", "in_article_image_1": "prompt", "in_article_image_2": "prompt"}'
],
[
'name' => 'keyword_cluster_id',
'type' => 'select',
'label' => 'Cluster',
'source' => 'igny8_get_cluster_options',
'required' => false
],
[
'name' => 'source',
'type' => 'select',
'label' => 'Source',
'options' => [
'AI' => 'AI',
'Manual' => 'Manual'
],
'required' => true,
'default' => 'AI'
],
[
'name' => 'status',
'type' => 'select',
'label' => 'Status',
'options' => [
'new' => 'New',
'scheduled' => 'Scheduled',
'published' => 'Published'
],
'required' => true,
'default' => 'new'
],
[
'name' => 'estimated_word_count',
'type' => 'number',
'label' => 'Estimated Words',
'required' => false
]
],
'title' => 'Content Idea',
'submit_text' => 'Save Idea'
],
'writer_tasks' => [
'fields' => [
[
'name' => 'title',
'type' => 'text',
'label' => 'Task Title',
'required' => true
],
[
'name' => 'cluster_id',
'type' => 'select',
'label' => 'Cluster Name',
'source' => 'igny8_get_cluster_options',
'required' => false
],
[
'name' => 'keywords',
'type' => 'text',
'label' => 'Keywords',
'required' => false
],
[
'name' => 'word_count',
'type' => 'number',
'label' => 'Word Count',
'required' => false
],
[
'name' => 'status',
'type' => 'select',
'label' => 'Status',
'options' => [
'queued' => 'Queued',
'in_progress' => 'In Progress',
'completed' => 'Completed',
'cancelled' => 'Cancelled',
'draft' => 'Draft',
'review' => 'Review',
'published' => 'Published'
],
'required' => true,
'default' => 'queued'
],
[
'name' => 'content_structure',
'type' => 'select',
'label' => 'Content Structure',
'options' => [
'cluster_hub' => 'Cluster Hub',
'landing_page' => 'Landing Page',
'guide_tutorial' => 'Guide Tutorial',
'how_to' => 'How To',
'comparison' => 'Comparison',
'review' => 'Review',
'top_listicle' => 'Top Listicle',
'question' => 'FAQ',
'product_description' => 'Product Description',
'service_page' => 'Service Page',
'home_page' => 'Home Page'
],
'required' => true,
'default' => 'cluster_hub'
],
[
'name' => 'content_type',
'type' => 'select',
'label' => 'Content Type',
'options' => [
'post' => 'Post',
'product' => 'Product',
'page' => 'Page',
'CPT' => 'Custom Post Type'
],
'required' => true,
'default' => 'post'
],
[
'name' => 'created_at',
'type' => 'text',
'label' => 'Created',
'required' => false,
'readonly' => true
]
],
'title' => 'Queue Task',
'submit_text' => 'Add to Queue'
],
'writer_drafts' => [
'fields' => [
[
'name' => 'title',
'type' => 'text',
'label' => 'Title',
'required' => true
],
[
'name' => 'status',
'type' => 'select',
'label' => 'Status',
'options' => [
'draft' => 'Draft'
],
'required' => true,
'default' => 'draft'
],
[
'name' => 'cluster_id',
'type' => 'select',
'label' => 'Cluster',
'source' => 'igny8_get_cluster_options',
'required' => false
],
[
'name' => 'content_structure',
'type' => 'select',
'label' => 'Content Structure',
'options' => [
'cluster_hub' => 'Cluster Hub',
'landing_page' => 'Landing Page',
'guide_tutorial' => 'Guide Tutorial',
'how_to' => 'How To',
'comparison' => 'Comparison',
'review' => 'Review',
'top_listicle' => 'Top Listicle',
'question' => 'FAQ',
'product_description' => 'Product Description',
'service_page' => 'Service Page',
'home_page' => 'Home Page'
],
'required' => false,
'default' => 'cluster_hub'
],
[
'name' => 'content_type',
'type' => 'select',
'label' => 'Content Type',
'options' => [
'post' => 'Post',
'product' => 'Product',
'page' => 'Page',
'CPT' => 'Custom Post Type'
],
'required' => false,
'default' => 'post'
],
[
'name' => 'meta_title',
'label' => 'Meta Title',
'type' => 'text',
'placeholder' => 'Enter SEO title...',
'maxlength' => 60
],
[
'name' => 'meta_description',
'label' => 'Meta Description',
'type' => 'textarea',
'placeholder' => 'Enter meta description...',
'maxlength' => 160
],
[
'name' => 'keywords',
'label' => 'Primary Keywords',
'type' => 'text',
'placeholder' => 'e.g., duvet covers, king size'
],
[
'name' => 'word_count',
'label' => 'Word Count',
'type' => 'number',
'readonly' => true
],
[
'name' => 'updated_at',
'type' => 'text',
'label' => 'Updated',
'required' => false,
'readonly' => true
]
],
'title' => 'Content Draft',
'submit_text' => 'Save Draft'
],
'writer_published' => [
'fields' => [
[
'name' => 'title',
'type' => 'text',
'label' => 'Title',
'required' => true
],
[
'name' => 'status',
'type' => 'select',
'label' => 'Status',
'options' => [
'published' => 'Published'
],
'required' => true,
'default' => 'published'
],
[
'name' => 'cluster_id',
'type' => 'select',
'label' => 'Cluster',
'source' => 'igny8_get_cluster_options',
'required' => false
],
[
'name' => 'content_structure',
'type' => 'select',
'label' => 'Content Structure',
'options' => [
'cluster_hub' => 'Cluster Hub',
'landing_page' => 'Landing Page',
'guide_tutorial' => 'Guide Tutorial',
'how_to' => 'How To',
'comparison' => 'Comparison',
'review' => 'Review',
'top_listicle' => 'Top Listicle',
'question' => 'FAQ',
'product_description' => 'Product Description',
'service_page' => 'Service Page',
'home_page' => 'Home Page'
],
'required' => false,
'default' => 'cluster_hub'
],
[
'name' => 'content_type',
'type' => 'select',
'label' => 'Content Type',
'options' => [
'post' => 'Post',
'product' => 'Product',
'page' => 'Page',
'CPT' => 'Custom Post Type'
],
'required' => false,
'default' => 'post'
],
[
'name' => 'meta_title',
'label' => 'Meta Title',
'type' => 'text',
'placeholder' => 'Enter SEO title...',
'maxlength' => 60
],
[
'name' => 'meta_description',
'label' => 'Meta Description',
'type' => 'textarea',
'placeholder' => 'Enter meta description...',
'maxlength' => 160
],
[
'name' => 'keywords',
'label' => 'Primary Keywords',
'type' => 'text',
'placeholder' => 'e.g., duvet covers, king size'
],
[
'name' => 'word_count',
'label' => 'Word Count',
'type' => 'number',
'readonly' => true
],
[
'name' => 'updated_at',
'type' => 'text',
'label' => 'Updated',
'required' => false,
'readonly' => true
]
],
'title' => 'Published Content',
'submit_text' => 'Save Published Content'
],
'writer_templates' => [
'fields' => [
[
'name' => 'prompt_name',
'type' => 'text',
'label' => 'Template Name',
'required' => true,
'placeholder' => 'Enter template name...'
],
[
'name' => 'prompt_type',
'type' => 'select',
'label' => 'Category',
'options' => [
'content' => 'Blog',
'optimization' => 'Review',
'generation' => 'Product',
'custom' => 'Custom'
],
'required' => true,
'default' => 'content'
],
[
'name' => 'is_active',
'type' => 'select',
'label' => 'Status',
'options' => [
'1' => 'Active',
'0' => 'Draft'
],
'required' => true,
'default' => '1'
],
[
'name' => 'prompt_text',
'type' => 'textarea',
'label' => 'Prompt Body',
'required' => true,
'rows' => 10,
'placeholder' => 'Enter the prompt template...'
],
[
'name' => 'variables',
'type' => 'textarea',
'label' => 'Variables (JSON)',
'required' => false,
'rows' => 5,
'placeholder' => '{"label": "Custom Label", "description": "Template description"}'
]
],
'title' => 'Content Template',
'submit_text' => 'Save Template'
],
'personalize_data' => [
'fields' => [
[
'name' => 'post_id',
'type' => 'number',
'label' => 'Post ID',
'required' => true
],
[
'name' => 'data_type',
'type' => 'text',
'label' => 'Data Type',
'required' => true
],
[
'name' => 'data',
'type' => 'textarea',
'label' => 'Data (JSON)',
'required' => true,
'rows' => 10
]
],
'title' => 'Personalization Data',
'submit_text' => 'Save Data'
],
'personalize_variations' => [
'fields' => [
[
'name' => 'post_id',
'type' => 'number',
'label' => 'Post ID',
'required' => true
],
[
'name' => 'fields_hash',
'type' => 'text',
'label' => 'Fields Hash',
'required' => true
],
[
'name' => 'fields_json',
'type' => 'textarea',
'label' => 'Fields JSON',
'required' => true,
'rows' => 5
],
[
'name' => 'content',
'type' => 'textarea',
'label' => 'Content',
'required' => true,
'rows' => 15
]
],
'title' => 'Content Variation',
'submit_text' => 'Save Variation'
]
];
}

View File

@@ -0,0 +1,150 @@
<?php
/**
* ==========================
* 🔐 IGNY8 FILE RULE HEADER
* ==========================
* @file : import-export-config.php
* @location : /modules/config/import-export-config.php
* @type : Config Array
* @scope : Global
* @allowed : Import/export definitions, file handling configurations
* @reusability : Globally Reusable
* @notes : Central import/export configuration for all modules
*/
// Prevent direct access
if (!defined('ABSPATH') && !defined('IGNY8_INCLUDE_CONFIG')) {
exit;
}
return [
// PLANNER MODULE (4 submodules)
'planner_keywords' => [
'type' => 'keywords',
'singular' => 'Keyword',
'plural' => 'Keywords',
'template_file' => 'igny8_keywords_template.csv',
'columns' => ['keyword', 'search_volume', 'difficulty', 'cpc', 'intent', 'status', 'sector_id', 'cluster_id'],
'required_fields' => ['keyword']
],
'planner_clusters' => [
'type' => 'clusters',
'singular' => 'Cluster',
'plural' => 'Clusters',
'template_file' => 'igny8_clusters_template.csv',
'columns' => ['cluster_name', 'sector_id', 'status', 'keyword_count', 'total_volume', 'avg_difficulty', 'mapped_pages_count'],
'required_fields' => ['cluster_name']
],
'planner_ideas' => [
'type' => 'ideas',
'singular' => 'Idea',
'plural' => 'Ideas',
'template_file' => 'igny8_ideas_template.csv',
'columns' => ['idea_title', 'idea_description', 'content_structure', 'content_type', 'keyword_cluster_id', 'target_keywords', 'status', 'estimated_word_count'],
'required_fields' => ['idea_title']
],
// WRITER MODULE (3 submodules)
'writer_tasks' => [
'type' => 'tasks',
'singular' => 'Task',
'plural' => 'Tasks',
'template_file' => 'igny8_tasks_template.csv',
'columns' => ['title', 'description', 'content_type', 'cluster_id', 'priority', 'status', 'keywords', 'schedule_at'],
'required_fields' => ['title']
],
'writer_drafts' => [
'type' => 'tasks',
'singular' => 'Draft',
'plural' => 'Drafts',
'template_file' => 'igny8_tasks_template.csv',
'columns' => ['title', 'description', 'content_type', 'cluster_id', 'status', 'assigned_post_id'],
'required_fields' => ['title']
],
'writer_published' => [
'type' => 'tasks',
'singular' => 'Published Content',
'plural' => 'Published Content',
'template_file' => 'igny8_tasks_template.csv',
'columns' => ['title', 'description', 'content_type', 'cluster_id', 'status', 'assigned_post_id'],
'required_fields' => ['title']
],
'writer_templates' => [
'type' => 'templates',
'singular' => 'Template',
'plural' => 'Templates',
'template_file' => 'igny8_templates_template.csv',
'columns' => ['template_name', 'prompt_type', 'system_prompt', 'user_prompt', 'is_active'],
'required_fields' => ['template_name']
],
// OPTIMIZER MODULE (2 submodules)
'optimizer_audits' => [
'type' => 'audits',
'singular' => 'Audit',
'plural' => 'Audits',
'template_file' => 'igny8_audits_template.csv',
'columns' => ['page_id', 'audit_status', 'seo_score', 'issues_found', 'recommendations'],
'required_fields' => ['page_id']
],
'optimizer_suggestions' => [
'type' => 'suggestions',
'singular' => 'Suggestion',
'plural' => 'Suggestions',
'template_file' => 'igny8_suggestions_template.csv',
'columns' => ['audit_id', 'suggestion_type', 'priority', 'status', 'impact_level'],
'required_fields' => ['audit_id']
],
// LINKER MODULE (2 submodules)
'linker_backlinks' => [
'type' => 'backlinks',
'singular' => 'Backlink',
'plural' => 'Backlinks',
'template_file' => 'igny8_backlinks_template.csv',
'columns' => ['source_url', 'target_url', 'anchor_text', 'domain_authority', 'link_type', 'status'],
'required_fields' => ['source_url', 'target_url']
],
'linker_campaigns' => [
'type' => 'campaigns',
'singular' => 'Campaign',
'plural' => 'Campaigns',
'template_file' => 'igny8_campaigns_template.csv',
'columns' => ['campaign_name', 'target_url', 'status', 'backlink_count', 'live_links_count'],
'required_fields' => ['campaign_name']
],
// PERSONALIZE MODULE (4 submodules)
'personalize_rewrites' => [
'type' => 'rewrites',
'singular' => 'Rewrite',
'plural' => 'Rewrites',
'template_file' => 'igny8_rewrites_template.csv',
'columns' => ['post_id', 'tone_id', 'variation_content', 'created_at'],
'required_fields' => ['post_id']
],
'personalize_tones' => [
'type' => 'tones',
'singular' => 'Tone',
'plural' => 'Tones',
'template_file' => 'igny8_tones_template.csv',
'columns' => ['tone_name', 'tone_type', 'description', 'status', 'usage_count'],
'required_fields' => ['tone_name']
],
'personalize_data' => [
'type' => 'personalization_data',
'singular' => 'Data Entry',
'plural' => 'Data Entries',
'template_file' => 'igny8_personalization_data_template.csv',
'columns' => ['data_key', 'data_value', 'data_type', 'created_at'],
'required_fields' => ['data_key']
],
'personalize_variations' => [
'type' => 'variations',
'singular' => 'Variation',
'plural' => 'Variations',
'template_file' => 'igny8_variations_template.csv',
'columns' => ['post_id', 'field_name', 'variation_content', 'tone_id'],
'required_fields' => ['post_id', 'field_name']
]
];

View File

@@ -0,0 +1,581 @@
<?php
/**
* ==========================
* 🔐 IGNY8 FILE RULE HEADER
* ==========================
* @file : kpi-config.php
* @location : /modules/config/kpi-config.php
* @type : Config Array
* @scope : Global
* @allowed : KPI definitions, metrics configurations
* @reusability : Globally Reusable
* @notes : Central KPI configuration for all modules
*/
// Prevent direct access only if not being included
if (!defined('ABSPATH') && !defined('IGNY8_INCLUDE_CONFIG')) {
exit;
}
return [
// Keywords KPIs
'planner_keywords' => [
'total_keywords' => [
'label' => 'Total Keywords',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => 'blue'
],
'mapped_keywords' => [
'label' => 'Mapped',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "mapped"',
'color' => 'green'
],
'unmapped_keywords' => [
'label' => 'Unmapped',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "unmapped"',
'color' => 'amber'
],
'total_volume' => [
'label' => 'Total Volume',
'query' => 'SELECT SUM(search_volume) as count FROM {table_name}',
'color' => 'purple'
],
'avg_difficulty' => [
'label' => 'Avg Difficulty',
'query' => 'SELECT ROUND(AVG(difficulty)) as count FROM {table_name}',
'color' => 'blue'
],
'high_volume_keywords' => [
'label' => 'High Volume (>1K)',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE search_volume > 1000',
'color' => 'green'
]
],
// Clusters KPIs
'planner_clusters' => [
'total_clusters' => [
'label' => 'Clusters',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => ''
],
'total_volume' => [
'label' => 'Volume',
'query' => 'SELECT SUM(total_volume) as count FROM {table_name}',
'color' => 'green'
],
'total_keywords' => [
'label' => 'Keywords',
'query' => 'SELECT SUM(keyword_count) as count FROM {table_name}',
'color' => 'amber'
],
'mapped_clusters' => [
'label' => 'Mapped',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE mapped_pages_count > 0',
'color' => 'purple'
],
'avg_keywords_per_cluster' => [
'label' => 'Avg Keywords/Cluster',
'query' => 'SELECT ROUND(AVG(keyword_count)) as count FROM {table_name}',
'color' => 'blue'
],
'high_volume_clusters' => [
'label' => 'High Volume Clusters',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE total_volume > 10000',
'color' => 'green'
]
],
// Ideas KPIs
'planner_ideas' => [
'total_ideas' => [
'label' => 'Ideas',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => ''
],
'new_ideas' => [
'label' => 'New',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "new"',
'color' => 'green'
],
'scheduled_ideas' => [
'label' => 'Scheduled',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "scheduled"',
'color' => 'amber'
],
'published_ideas' => [
'label' => 'Published',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "published"',
'color' => 'purple'
],
'ai_generated' => [
'label' => 'AI Generated',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE source = "AI"',
'color' => 'blue'
],
'recent_ideas' => [
'label' => 'This Week',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)',
'color' => 'green'
]
],
// Planner Home KPIs (Main Dashboard)
'planner_home' => [
'total_keywords' => [
'label' => 'Keywords',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_keywords',
'color' => ''
],
'total_volume' => [
'label' => 'Volume',
'query' => 'SELECT SUM(search_volume) as count FROM {prefix}igny8_keywords',
'color' => 'green'
],
'total_clusters' => [
'label' => 'Clusters',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_clusters',
'color' => 'amber'
],
'total_ideas' => [
'label' => 'Ideas',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_content_ideas',
'color' => 'purple'
],
'high_volume_keywords' => [
'label' => 'High Vol (>1K)',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_keywords WHERE search_volume > 1000',
'color' => 'blue'
],
'recent_ideas' => [
'label' => 'This Week',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_content_ideas WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)',
'color' => 'teal'
],
'mapped_keywords' => [
'label' => 'Mapped Keywords',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_keywords WHERE status = "mapped"',
'color' => 'green'
],
'unmapped_keywords' => [
'label' => 'Unmapped Keywords',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_keywords WHERE status = "unmapped"',
'color' => 'amber'
],
'clusters_with_ideas' => [
'label' => 'Clusters With Ideas',
'query' => 'SELECT COUNT(DISTINCT keyword_cluster_id) as count FROM {prefix}igny8_content_ideas WHERE keyword_cluster_id IS NOT NULL',
'color' => 'green'
],
'queued_ideas' => [
'label' => 'Queued Ideas',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_content_ideas WHERE status = "scheduled"',
'color' => 'amber'
]
],
// Writer Home KPIs (Main Dashboard)
'writer_home' => [
'queued_tasks' => [
'label' => 'Queued Tasks',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status IN ("queued", "in_progress")',
'color' => 'blue'
],
'draft_tasks' => [
'label' => 'Drafts',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status IN ("draft", "review")',
'color' => 'amber'
],
'published_tasks' => [
'label' => 'Published',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status = "published"',
'color' => 'green'
],
'total_tasks' => [
'label' => 'Total Tasks',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks',
'color' => ''
]
],
// Writer Tasks KPIs
'writer_tasks' => [
'total_ideas' => [
'label' => 'Ideas',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_content_ideas',
'color' => ''
],
'content_scheduled' => [
'label' => 'Content Scheduled',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status IN ("queued", "in_progress")',
'color' => 'green'
],
'written' => [
'label' => 'Written',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status IN ("draft", "review")',
'color' => 'amber'
],
'published' => [
'label' => 'Published',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status = "published"',
'color' => 'purple'
]
],
// Writer Drafts KPIs
'writer_drafts' => [
'total_ideas' => [
'label' => 'Ideas',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_content_ideas',
'color' => ''
],
'content_scheduled' => [
'label' => 'Content Scheduled',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status IN ("queued", "in_progress")',
'color' => 'green'
],
'written' => [
'label' => 'Written',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status IN ("draft", "review")',
'color' => 'amber'
],
'published' => [
'label' => 'Published',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status = "published"',
'color' => 'purple'
]
],
// Writer Published KPIs
'writer_published' => [
'total_ideas' => [
'label' => 'Ideas',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_content_ideas',
'color' => ''
],
'content_scheduled' => [
'label' => 'Content Scheduled',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status IN ("queued", "in_progress")',
'color' => 'green'
],
'written' => [
'label' => 'Written',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status IN ("draft", "review")',
'color' => 'amber'
],
'published' => [
'label' => 'Published',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_tasks WHERE status = "published"',
'color' => 'purple'
]
],
// Optimizer Audits KPIs
'optimizer_audits' => [
'total_audits' => [
'label' => 'Total Audits',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => 'blue'
],
'completed_audits' => [
'label' => 'Completed',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE audit_status = "completed"',
'color' => 'green'
],
'pending_audits' => [
'label' => 'Pending',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE audit_status = "pending"',
'color' => 'amber'
],
'avg_seo_score' => [
'label' => 'Avg SEO Score',
'query' => 'SELECT ROUND(AVG(seo_score)) as count FROM {table_name} WHERE audit_status = "completed"',
'color' => 'purple'
],
'total_issues' => [
'label' => 'Total Issues',
'query' => 'SELECT SUM(issues_found) as count FROM {table_name} WHERE audit_status = "completed"',
'color' => 'blue'
],
'recent_audits' => [
'label' => 'This Week',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)',
'color' => 'green'
]
],
// Writer Templates KPIs
'writer_templates' => [
'total_templates' => [
'label' => 'Total Templates',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => 'blue'
],
'active_templates' => [
'label' => 'Active',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE is_active = 1',
'color' => 'green'
],
'draft_templates' => [
'label' => 'Draft',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE is_active = 0',
'color' => 'gray'
],
'content_templates' => [
'label' => 'Blog Templates',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE prompt_type = "content"',
'color' => 'blue'
],
'product_templates' => [
'label' => 'Product Templates',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE prompt_type = "generation"',
'color' => 'green'
],
'popular_templates' => [
'label' => 'Popular (>10 uses)',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE usage_count > 10',
'color' => 'purple'
]
],
// Optimizer Suggestions KPIs
'optimizer_suggestions' => [
'total_suggestions' => [
'label' => 'Total Suggestions',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => 'blue'
],
'implemented' => [
'label' => 'Implemented',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "implemented"',
'color' => 'green'
],
'pending' => [
'label' => 'Pending',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "pending"',
'color' => 'amber'
],
'high_impact' => [
'label' => 'High Impact',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE impact_level = "high"',
'color' => 'purple'
],
'avg_improvement' => [
'label' => 'Avg Improvement',
'query' => 'SELECT ROUND(AVG(improvement_score)) as count FROM {table_name} WHERE status = "implemented"',
'color' => 'blue'
],
'recent_suggestions' => [
'label' => 'This Week',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)',
'color' => 'green'
]
],
// Linker Backlinks KPIs
'linker_backlinks' => [
'total_backlinks' => [
'label' => 'Total Backlinks',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => 'blue'
],
'active_backlinks' => [
'label' => 'Active',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "active"',
'color' => 'green'
],
'lost_backlinks' => [
'label' => 'Lost',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "lost"',
'color' => 'amber'
],
'avg_domain_authority' => [
'label' => 'Avg DA',
'query' => 'SELECT ROUND(AVG(domain_authority)) as count FROM {table_name} WHERE status = "active"',
'color' => 'purple'
],
'dofollow_links' => [
'label' => 'DoFollow Links',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE link_type = "dofollow" AND status = "active"',
'color' => 'blue'
],
'recent_backlinks' => [
'label' => 'This Week',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)',
'color' => 'green'
]
],
// Linker Campaigns KPIs
'linker_campaigns' => [
'total_campaigns' => [
'label' => 'Total Campaigns',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => 'blue'
],
'active_campaigns' => [
'label' => 'Active',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "active"',
'color' => 'green'
],
'completed_campaigns' => [
'label' => 'Completed',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "completed"',
'color' => 'amber'
],
'avg_links_per_campaign' => [
'label' => 'Avg Links/Campaign',
'query' => 'SELECT ROUND(AVG(links_acquired)) as count FROM {table_name}',
'color' => 'purple'
],
'success_rate' => [
'label' => 'Success Rate %',
'query' => 'SELECT ROUND((COUNT(CASE WHEN status = "completed" THEN 1 END) * 100.0 / COUNT(*))) as count FROM {table_name}',
'color' => 'blue'
],
'recent_campaigns' => [
'label' => 'This Week',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)',
'color' => 'green'
]
],
// Personalize Rewrites KPIs
'personalize_rewrites' => [
'total_rewrites' => [
'label' => 'Total Variations',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => 'blue'
],
'this_month_rewrites' => [
'label' => 'This Month',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE created_at >= DATE_FORMAT(NOW(), "%Y-%m-01")',
'color' => 'amber'
],
'total_ai_sessions' => [
'label' => 'AI Sessions',
'query' => 'SELECT COUNT(*) as count FROM {prefix}igny8_logs WHERE log_type = "field_detection" OR log_type = "content_generation"',
'color' => 'green'
],
'avg_sessions_per_rewrite' => [
'label' => 'Avg Sessions/Rewrite',
'query' => 'SELECT ROUND((SELECT COUNT(*) FROM {prefix}igny8_logs WHERE log_type = "field_detection" OR log_type = "content_generation") / GREATEST(COUNT(*), 1), 1) as count FROM {table_name}',
'color' => 'purple'
],
'recent_rewrites' => [
'label' => 'This Week',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)',
'color' => 'green'
],
'successful_rewrites' => [
'label' => 'Successful',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "completed"',
'color' => 'blue'
]
],
// Personalize Tones KPIs
'personalize_tones' => [
'total_tones' => [
'label' => 'Total Tones',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => 'blue'
],
'active_tones' => [
'label' => 'Active',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "active"',
'color' => 'green'
],
'custom_tones' => [
'label' => 'Custom',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE tone_type = "custom"',
'color' => 'amber'
],
'avg_usage_frequency' => [
'label' => 'Avg Usage',
'query' => 'SELECT ROUND(AVG(usage_count)) as count FROM {table_name}',
'color' => 'purple'
],
'popular_tones' => [
'label' => 'Popular (>50 uses)',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE usage_count > 50',
'color' => 'blue'
],
'recent_tones' => [
'label' => 'This Week',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)',
'color' => 'green'
]
],
// Personalization Data KPIs
'personalize_data' => [
'total_data_entries' => [
'label' => 'Total Data Entries',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => 'blue'
],
'personalization_data' => [
'label' => 'Personalization Data',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE data_type = "personalization"',
'color' => 'green'
],
'field_data' => [
'label' => 'Field Data',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE data_type = "fields"',
'color' => 'amber'
],
'recent_entries' => [
'label' => 'Recent (7 days)',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)',
'color' => 'purple'
],
'active_entries' => [
'label' => 'Active',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "active"',
'color' => 'green'
],
'avg_usage_per_entry' => [
'label' => 'Avg Usage/Entry',
'query' => 'SELECT ROUND(AVG(usage_count)) as count FROM {table_name}',
'color' => 'blue'
]
],
// Personalization Variations KPIs
'personalize_variations' => [
'total_variations' => [
'label' => 'Total Variations',
'query' => 'SELECT COUNT(*) as count FROM {table_name}',
'color' => 'blue'
],
'unique_posts' => [
'label' => 'Unique Posts',
'query' => 'SELECT COUNT(DISTINCT post_id) as count FROM {table_name}',
'color' => 'green'
],
'recent_variations' => [
'label' => 'Recent (7 days)',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)',
'color' => 'amber'
],
'avg_variations_per_post' => [
'label' => 'Avg Variations/Post',
'query' => 'SELECT ROUND(COUNT(*) / COUNT(DISTINCT post_id), 2) as count FROM {table_name}',
'color' => 'purple'
],
'published_variations' => [
'label' => 'Published',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE status = "published"',
'color' => 'green'
],
'high_performing_variations' => [
'label' => 'High Performing',
'query' => 'SELECT COUNT(*) as count FROM {table_name} WHERE performance_score > 80',
'color' => 'blue'
]
]
];

View File

@@ -0,0 +1,989 @@
<?php
/**
* ==========================
* 🔐 IGNY8 FILE RULE HEADER
* ==========================
* @file : tables-config.php
* @location : /modules/config/tables-config.php
* @type : Config Array
* @scope : Global
* @allowed : Table definitions, column structures, configuration data
* @reusability : Globally Reusable
* @notes : Central table configuration for all modules
*/
// Prevent direct access only if not being included
if (!defined('ABSPATH') && !defined('IGNY8_INCLUDE_CONFIG')) {
exit;
}
return [
// Keywords Table
'planner_keywords' => [
'table' => 'igny8_keywords',
'title' => 'Keywords Management',
'humanize_columns' => ['keyword', 'search_volume', 'difficulty', 'cpc', 'intent', 'status', 'cluster_id'],
'columns' => [
'keyword' => [
'label' => 'Keyword',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'search_volume' => [
'label' => 'Volume',
'type' => 'number',
'sortable' => true,
'format' => 'number'
],
'difficulty' => [
'label' => 'Difficulty',
'type' => 'number',
'sortable' => true,
'format' => 'difficulty_label'
],
'cpc' => [
'label' => 'CPC',
'type' => 'number',
'sortable' => true,
'decimal' => true
],
'intent' => [
'label' => 'Intent',
'type' => 'enum',
'options' => ['informational', 'navigational', 'transactional', 'commercial'],
'sortable' => true
],
'status' => [
'label' => 'Status',
'type' => 'enum',
'options' => ['unmapped', 'mapped', 'queued', 'published'],
'sortable' => true
],
'cluster_id' => [
'label' => 'Cluster',
'type' => 'lookup',
'source_field' => 'cluster_id',
'display_field' => 'cluster_name',
'sortable' => true,
'join_query' => 'LEFT JOIN {prefix}igny8_clusters c ON {table_name}.cluster_id = c.id',
'select_field' => 'c.cluster_name as cluster_name'
]
],
'pagination' => ['per_page' => 10, 'enabled' => true],
'search_field' => 'keyword',
'search_placeholder' => 'Search keywords...',
'actions' => ['delete_selected', 'export_selected', 'import', 'add_new'],
'bulk_actions' => ['delete', 'map'],
'row_actions' => ['edit', 'delete']
],
// Clusters Table
'planner_clusters' => [
'table' => 'igny8_clusters',
'title' => 'Clusters Management',
'humanize_columns' => ['cluster_name', 'sector_id', 'status', 'keyword_count', 'total_volume', 'avg_difficulty', 'mapped_pages_count', 'created_at'],
'columns' => [
'cluster_name' => [
'label' => 'Cluster Name',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'sector_id' => [
'label' => 'Sectors',
'type' => 'text',
'source_field' => 'sector_id',
'display_field' => 'sector_name',
'sortable' => true,
'join_query' => 'LEFT JOIN {prefix}igny8_sectors s ON {table_name}.sector_id = s.id',
'select_field' => 's.sector_name as sector_name'
],
'status' => [
'label' => 'Status',
'type' => 'enum',
'options' => ['active', 'inactive', 'archived'],
'sortable' => true
],
'keyword_count' => [
'label' => 'Keywords',
'type' => 'number',
'sortable' => true,
'calculated' => false
//'calculation_query' => 'SELECT COUNT(k.id) FROM {prefix}igny8_keywords k WHERE k.cluster_id = {table_name}.id'
],
'total_volume' => [
'label' => 'Total Volume',
'type' => 'number',
'sortable' => true,
'format' => 'number'
],
'avg_difficulty' => [
'label' => 'Avg KD',
'type' => 'number',
'sortable' => true,
'format' => 'difficulty_label'
],
'mapped_pages_count' => [
'label' => 'Mapped Pages',
'type' => 'number',
'sortable' => true,
'calculated' => false
],
'created_at' => [
'label' => 'Created',
'type' => 'date',
'sortable' => true,
'format' => 'date'
]
],
'pagination' => ['per_page' => 10, 'enabled' => true],
'search_field' => 'cluster_name',
'search_placeholder' => 'Search clusters...',
'actions' => ['delete_selected', 'export_selected', 'import', 'add_new'],
'bulk_actions' => ['delete', 'activate', 'deactivate'],
'row_actions' => ['edit', 'delete', 'view_keywords']
],
// Ideas Table
'planner_ideas' => [
'table' => 'igny8_content_ideas',
'title' => 'Content Ideas Management',
'humanize_columns' => ['idea_title', 'content_structure', 'content_type', 'target_keywords', 'keyword_cluster_id', 'status', 'estimated_word_count', 'created_at'],
'columns' => [
'idea_title' => [
'label' => 'Title',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'content_structure' => [
'label' => 'Structure',
'type' => 'enum',
'options' => ['cluster_hub', 'landing_page', 'guide_tutorial', 'how_to', 'comparison', 'review', 'top_listicle', 'question', 'product_description', 'service_page', 'home_page'],
'sortable' => true
],
'content_type' => [
'label' => 'Type',
'type' => 'enum',
'options' => ['post', 'product', 'page', 'CPT'],
'sortable' => true
],
'target_keywords' => [
'label' => 'Target Keywords',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'keyword_cluster_id' => [
'label' => 'Cluster',
'type' => 'lookup',
'source_field' => 'keyword_cluster_id',
'display_field' => 'cluster_name',
'sortable' => true,
'join_query' => 'LEFT JOIN {prefix}igny8_clusters c ON {table_name}.keyword_cluster_id = c.id',
'select_field' => 'c.cluster_name as cluster_name'
],
'status' => [
'label' => 'Status',
'type' => 'enum',
'options' => ['new', 'scheduled', 'published'],
'sortable' => true
],
'estimated_word_count' => [
'label' => 'Words',
'type' => 'number',
'sortable' => true
],
'created_at' => [
'label' => 'Created',
'type' => 'date',
'sortable' => true,
'format' => 'date'
]
],
'pagination' => ['per_page' => 10, 'enabled' => true],
'search_field' => 'idea_title',
'search_placeholder' => 'Search ideas...',
'actions' => ['delete_selected', 'export_selected', 'import', 'add_new'],
'bulk_actions' => ['delete', 'change_status', 'bulk_queue_to_writer'],
'row_actions' => ['edit', 'delete', 'create_draft', 'queue_to_writer']
],
// Writer Tasks Table (Content Queue / Tasks)
'writer_tasks' => [
'table' => 'igny8_tasks',
'title' => 'Content Queue / Tasks',
'humanize_columns' => ['title', 'cluster_id', 'keywords', 'word_count', 'status', 'content_structure', 'content_type', 'created_at'],
'default_filter' => [
'status' => ['queued', 'in_progress']
],
'columns' => [
'title' => [
'label' => 'Task Title',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'cluster_id' => [
'label' => 'Cluster Name',
'type' => 'lookup',
'source_field' => 'cluster_id',
'display_field' => 'cluster_name',
'sortable' => true,
'join_query' => 'LEFT JOIN {prefix}igny8_clusters c ON {table_name}.cluster_id = c.id',
'select_field' => 'c.cluster_name as cluster_name'
],
'keywords' => [
'label' => 'Keywords',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'word_count' => [
'label' => 'Word Count',
'type' => 'number',
'sortable' => true,
'format' => 'number'
],
'status' => [
'label' => 'Status',
'type' => 'enum',
'sortable' => true,
'options' => ['queued', 'in_progress', 'completed', 'cancelled', 'draft', 'review', 'published']
],
'content_structure' => [
'label' => 'Structure',
'type' => 'enum',
'sortable' => true,
'options' => ['cluster_hub', 'landing_page', 'guide_tutorial', 'how_to', 'comparison', 'review', 'top_listicle', 'question', 'product_description', 'service_page', 'home_page']
],
'content_type' => [
'label' => 'Type',
'type' => 'enum',
'sortable' => true,
'options' => ['post', 'product', 'page', 'CPT']
],
'created_at' => [
'label' => 'Created',
'type' => 'datetime',
'sortable' => true,
'format' => 'time_ago_created'
]
],
'pagination' => ['per_page' => 20, 'enabled' => true],
'search_field' => 'title',
'search_placeholder' => 'Search tasks...',
'filters' => [
'status' => [
'label' => 'Status',
'type' => 'select',
'options' => ['queued', 'in_progress']
],
'priority' => [
'label' => 'Priority',
'type' => 'select',
'options' => ['urgent', 'high', 'medium', 'low']
],
'content_structure' => [
'label' => 'Content Structure',
'type' => 'select',
'options' => ['cluster_hub', 'landing_page', 'guide_tutorial', 'how_to', 'comparison', 'review', 'top_listicle', 'question', 'product_description', 'service_page', 'home_page']
],
'content_type' => [
'label' => 'Content Type',
'type' => 'select',
'options' => ['post', 'product', 'page', 'CPT']
],
'cluster_id' => [
'label' => 'Cluster',
'type' => 'select',
'options' => 'dynamic_clusters'
]
],
'actions' => ['delete_selected', 'export_selected', 'add_new'],
'bulk_actions' => ['delete', 'mark_in_progress', 'move_to_drafts'],
'row_actions' => ['edit', 'delete']
],
// Writer Drafts Table (Content Generated)
'writer_drafts' => [
'table' => 'igny8_tasks',
'title' => 'Content Generated',
'humanize_columns' => ['title', 'cluster_id', 'status', 'content_structure', 'content_type', 'meta_title', 'meta_description', 'keywords', 'word_count', 'updated_at'],
'default_filter' => [
'status' => ['draft', 'review']
],
'columns' => [
'title' => [
'label' => 'Title',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'cluster_id' => [
'label' => 'Cluster',
'type' => 'lookup',
'source_field' => 'cluster_id',
'display_field' => 'cluster_name',
'sortable' => true,
'join_query' => 'LEFT JOIN {prefix}igny8_clusters c ON {table_name}.cluster_id = c.id',
'select_field' => 'c.cluster_name as cluster_name'
],
'status' => [
'label' => 'Status',
'type' => 'enum',
'sortable' => true,
'options' => ['draft', 'review']
],
'content_structure' => [
'label' => 'Structure',
'type' => 'enum',
'sortable' => true,
'options' => ['cluster_hub', 'landing_page', 'guide_tutorial', 'how_to', 'comparison', 'review', 'top_listicle', 'question', 'product_description', 'service_page', 'home_page']
],
'content_type' => [
'label' => 'Type',
'type' => 'enum',
'sortable' => true,
'options' => ['post', 'product', 'page', 'CPT']
],
'meta_title' => [
'label' => 'Meta Title',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'meta_description' => [
'label' => 'Meta Description',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'keywords' => [
'label' => 'Keywords',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'word_count' => [
'label' => 'Word Count',
'type' => 'number',
'sortable' => true
],
'updated_at' => [
'label' => 'Updated',
'type' => 'datetime',
'sortable' => true,
'format' => 'time_ago_updated'
]
],
'pagination' => ['per_page' => 20, 'enabled' => true],
'search_field' => 'title',
'search_placeholder' => 'Search drafts...',
'filters' => [
'status' => [
'label' => 'Status',
'type' => 'select',
'options' => ['draft', 'review']
],
'content_structure' => [
'label' => 'Content Structure',
'type' => 'select',
'options' => ['cluster_hub', 'landing_page', 'guide_tutorial', 'how_to', 'comparison', 'review', 'top_listicle', 'question', 'product_description', 'service_page', 'home_page']
],
'content_type' => [
'label' => 'Content Type',
'type' => 'select',
'options' => ['post', 'product', 'page', 'CPT']
],
'cluster_id' => [
'label' => 'Cluster',
'type' => 'select',
'options' => 'dynamic_clusters'
]
],
'actions' => ['delete_selected', 'publish_selected', 'export_selected', 'add_new'],
'bulk_actions' => ['delete', 'move_to_queue', 'publish'],
'row_actions' => ['edit', 'publish', 'delete']
],
// Writer Published Table (Live Content)
'writer_published' => [
'table' => 'igny8_tasks',
'title' => 'Live Content',
'humanize_columns' => ['title', 'status', 'cluster_id', 'content_structure', 'content_type', 'meta_title', 'meta_description', 'keywords', 'word_count', 'updated_at'],
'default_filter' => [
'status' => ['published']
],
'columns' => [
'title' => [
'label' => 'Title',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'status' => [
'label' => 'Status',
'type' => 'enum',
'sortable' => true,
'options' => ['published']
],
'cluster_id' => [
'label' => 'Cluster',
'type' => 'lookup',
'source_field' => 'cluster_id',
'display_field' => 'cluster_name',
'sortable' => true,
'join_query' => 'LEFT JOIN {prefix}igny8_clusters c ON {table_name}.cluster_id = c.id',
'select_field' => 'c.cluster_name as cluster_name'
],
'content_structure' => [
'label' => 'Structure',
'type' => 'enum',
'sortable' => true,
'options' => ['cluster_hub', 'landing_page', 'guide_tutorial', 'how_to', 'comparison', 'review', 'top_listicle', 'question', 'product_description', 'service_page', 'home_page']
],
'content_type' => [
'label' => 'Type',
'type' => 'enum',
'sortable' => true,
'options' => ['post', 'product', 'page', 'CPT']
],
'meta_title' => [
'label' => 'Meta Title',
'type' => 'text',
'source_meta' => '_igny8_meta_title'
],
'meta_description' => [
'label' => 'Meta Description',
'type' => 'text',
'source_meta' => '_igny8_meta_description'
],
'keywords' => [
'label' => 'Keywords',
'type' => 'text',
'source_meta' => '_igny8_primary_keywords'
],
'word_count' => [
'label' => 'Word Count',
'type' => 'number',
'source_meta' => '_igny8_word_count',
'sortable' => true
],
'updated_at' => [
'label' => 'Updated',
'type' => 'datetime',
'sortable' => true,
'format' => 'time_ago_updated'
]
],
'pagination' => ['per_page' => 20, 'enabled' => true],
'search_field' => 'title',
'search_placeholder' => 'Search published content...',
'filters' => [
'status' => [
'label' => 'Status',
'type' => 'select',
'options' => ['published']
],
'content_structure' => [
'label' => 'Content Structure',
'type' => 'select',
'options' => ['cluster_hub', 'landing_page', 'guide_tutorial', 'how_to', 'comparison', 'review', 'top_listicle', 'question', 'product_description', 'service_page', 'home_page']
],
'content_type' => [
'label' => 'Content Type',
'type' => 'select',
'options' => ['post', 'product', 'page', 'CPT']
],
'cluster_id' => [
'label' => 'Cluster',
'type' => 'select',
'options' => 'dynamic_clusters'
],
'created_at' => [
'label' => 'Date Range',
'type' => 'date_range',
'field' => 'created_at'
]
],
'actions' => ['delete_selected', 'export_selected', 'add_new'],
'bulk_actions' => ['delete', 'move_to_draft', 'unpublish'],
'row_actions' => ['edit', 'unpublish', 'delete']
],
// Optimizer Audits Table
'optimizer_audits' => [
'table' => 'igny8_audits',
'title' => 'SEO Audits Management',
'columns' => [
'page_url' => [
'label' => 'Page URL',
'type' => 'text',
'sortable' => true,
'searchable' => true,
'format' => 'url'
],
'seo_score' => [
'label' => 'SEO Score',
'type' => 'number',
'sortable' => true,
'format' => 'score'
],
'audit_status' => [
'label' => 'Status',
'type' => 'enum',
'options' => ['pending', 'in_progress', 'completed', 'failed'],
'sortable' => true
],
'issues_found' => [
'label' => 'Issues',
'type' => 'number',
'sortable' => true
],
'last_audit' => [
'label' => 'Last Audit',
'type' => 'date',
'sortable' => true,
'format' => 'datetime'
],
'next_audit' => [
'label' => 'Next Audit',
'type' => 'date',
'sortable' => true,
'format' => 'date'
]
],
'pagination' => ['per_page' => 10, 'enabled' => true],
'search_field' => 'page_url',
'search_placeholder' => 'Search pages...',
'actions' => ['delete_selected', 'export_selected', 'bulk_audit'],
'bulk_actions' => ['run_audit', 'schedule_audit'],
'row_actions' => ['view_details', 'run_audit', 'delete']
],
// Linker Backlinks Table
'linker_backlinks' => [
'table' => 'igny8_backlinks',
'title' => 'Backlinks Management',
'columns' => [
'target_url' => [
'label' => 'Target URL',
'type' => 'text',
'sortable' => true,
'searchable' => true,
'format' => 'url'
],
'source_domain' => [
'label' => 'Source Domain',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'link_type' => [
'label' => 'Link Type',
'type' => 'enum',
'options' => ['dofollow', 'nofollow', 'sponsored', 'ugc'],
'sortable' => true
],
'status' => [
'label' => 'Status',
'type' => 'enum',
'options' => ['active', 'lost', 'pending'],
'sortable' => true
],
'domain_authority' => [
'label' => 'DA',
'type' => 'number',
'sortable' => true
],
'anchor_text' => [
'label' => 'Anchor Text',
'type' => 'text',
'sortable' => true
],
'discovered_date' => [
'label' => 'Discovered',
'type' => 'date',
'sortable' => true,
'format' => 'date'
]
],
'pagination' => ['per_page' => 10, 'enabled' => true],
'search_field' => 'target_url',
'search_placeholder' => 'Search backlinks...',
'actions' => ['delete_selected', 'export_selected', 'recheck_links'],
'bulk_actions' => ['recheck', 'mark_lost'],
'row_actions' => ['edit', 'delete', 'recheck', 'view_source']
],
// Writer Templates Table (Prompts)
'writer_templates' => [
'table' => 'igny8_prompts',
'title' => 'Content Templates Management',
'columns' => [
'prompt_name' => [
'label' => 'Template Name',
'type' => 'text',
'sortable' => true,
'searchable' => true,
'source_field' => 'prompt_name',
'editable' => true
],
'category' => [
'label' => 'Category',
'type' => 'text',
'sortable' => true,
'source_field' => 'prompt_type',
'options' => [
'content' => 'Blog',
'optimization' => 'Review',
'generation' => 'Product',
'custom' => 'Custom'
]
],
'status' => [
'label' => 'Status',
'type' => 'badge',
'sortable' => true,
'source_field' => 'is_active',
'options' => [
'1' => ['label' => 'Active', 'color' => 'green'],
'0' => ['label' => 'Draft', 'color' => 'gray']
]
],
'label' => [
'label' => 'Label',
'type' => 'text',
'sortable' => true,
'source_field' => 'variables',
'format' => 'json_extract',
'json_path' => '$.label'
],
'prompt_text' => [
'label' => 'Prompt Body',
'type' => 'truncated_text',
'sortable' => false,
'source_field' => 'prompt_text',
'truncate_length' => 100,
'tooltip' => true
],
'created_at' => [
'label' => 'Created',
'type' => 'datetime',
'sortable' => true,
'format' => 'datetime'
]
],
'pagination' => ['per_page' => 15, 'enabled' => true],
'search_field' => 'prompt_name',
'search_placeholder' => 'Search templates...',
'actions' => ['delete_selected', 'export_selected', 'import', 'add_new'],
'bulk_actions' => ['delete', 'activate', 'deactivate'],
'row_actions' => ['edit', 'duplicate', 'delete']
],
// Optimizer Suggestions Table
'optimizer_suggestions' => [
'table' => 'igny8_suggestions',
'title' => 'SEO Suggestions Management',
'columns' => [
'page_url' => [
'label' => 'Page URL',
'type' => 'text',
'sortable' => true,
'searchable' => true,
'format' => 'url'
],
'suggestion_type' => [
'label' => 'Type',
'type' => 'enum',
'options' => ['title_optimization', 'meta_description', 'heading_structure', 'content_improvement', 'internal_linking'],
'sortable' => true
],
'priority' => [
'label' => 'Priority',
'type' => 'enum',
'options' => ['high', 'medium', 'low'],
'sortable' => true
],
'status' => [
'label' => 'Status',
'type' => 'enum',
'options' => ['pending', 'in_progress', 'completed', 'dismissed'],
'sortable' => true
],
'impact_score' => [
'label' => 'Impact Score',
'type' => 'number',
'sortable' => true,
'format' => 'score'
],
'created_date' => [
'label' => 'Created',
'type' => 'date',
'sortable' => true,
'format' => 'date'
]
],
'pagination' => ['per_page' => 10, 'enabled' => true],
'search_field' => 'page_url',
'search_placeholder' => 'Search pages...',
'actions' => ['delete_selected', 'export_selected', 'bulk_apply'],
'bulk_actions' => ['apply', 'dismiss', 'change_priority'],
'row_actions' => ['view_details', 'apply', 'dismiss']
],
// Linker Campaigns Table
'linker_campaigns' => [
'table' => 'igny8_campaigns',
'title' => 'Link Building Campaigns',
'columns' => [
'campaign_name' => [
'label' => 'Campaign Name',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'target_url' => [
'label' => 'Target URL',
'type' => 'text',
'sortable' => true,
'searchable' => true,
'format' => 'url'
],
'status' => [
'label' => 'Status',
'type' => 'enum',
'options' => ['planning', 'active', 'paused', 'completed', 'cancelled'],
'sortable' => true
],
'links_acquired' => [
'label' => 'Links Acquired',
'type' => 'number',
'sortable' => true
],
'target_links' => [
'label' => 'Target Links',
'type' => 'number',
'sortable' => true
],
'completion_percentage' => [
'label' => 'Completion %',
'type' => 'number',
'sortable' => true,
'format' => 'percentage'
],
'start_date' => [
'label' => 'Start Date',
'type' => 'date',
'sortable' => true,
'format' => 'date'
],
'end_date' => [
'label' => 'End Date',
'type' => 'date',
'sortable' => true,
'format' => 'date'
]
],
'pagination' => ['per_page' => 10, 'enabled' => true],
'search_field' => 'campaign_name',
'search_placeholder' => 'Search campaigns...',
'actions' => ['delete_selected', 'export_selected', 'import', 'add_new'],
'bulk_actions' => ['delete', 'activate', 'pause', 'complete'],
'row_actions' => ['edit', 'delete', 'view_progress', 'duplicate']
],
// Personalize Rewrites Table
'personalize_rewrites' => [
'table' => 'igny8_variations',
'title' => 'Content Variations Management',
'humanize_columns' => ['post_id', 'field_inputs', 'personalized_content', 'fields_hash', 'created_at'],
'columns' => [
'post_id' => [
'label' => 'Post',
'type' => 'text',
'sortable' => true,
'searchable' => true,
'join_query' => 'LEFT JOIN {prefix}posts p ON {table_name}.post_id = p.ID',
'select_field' => 'p.post_title as post_title',
'display_field' => 'post_title'
],
'field_inputs' => [
'label' => 'Field Inputs',
'type' => 'text',
'sortable' => false,
'searchable' => true,
'truncate' => 100
],
'personalized_content' => [
'label' => 'Personalized Content',
'type' => 'text',
'sortable' => false,
'searchable' => true,
'truncate' => 150
],
'fields_hash' => [
'label' => 'Fields Hash',
'type' => 'text',
'sortable' => true,
'searchable' => true,
'truncate' => 20
],
'created_at' => [
'label' => 'Created',
'type' => 'date',
'sortable' => true,
'format' => 'datetime'
]
],
'pagination' => ['per_page' => 20, 'enabled' => true],
'search_field' => 'personalized_content',
'search_placeholder' => 'Search personalized content...',
'actions' => ['delete_selected', 'export_selected', 'bulk_delete'],
'bulk_actions' => ['delete'],
'row_actions' => ['edit', 'delete', 'preview']
],
// Personalize Tones Table
'personalize_tones' => [
'table' => 'igny8_tones',
'title' => 'Tone Management',
'columns' => [
'tone_name' => [
'label' => 'Tone Name',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'description' => [
'label' => 'Description',
'type' => 'text',
'sortable' => false,
'searchable' => true,
'truncate' => 150
],
'category' => [
'label' => 'Category',
'type' => 'enum',
'options' => ['business', 'creative', 'technical', 'marketing', 'educational'],
'sortable' => true
],
'status' => [
'label' => 'Status',
'type' => 'enum',
'options' => ['active', 'inactive', 'draft'],
'sortable' => true
],
'usage_count' => [
'label' => 'Usage Count',
'type' => 'number',
'sortable' => true
],
'created_date' => [
'label' => 'Created',
'type' => 'date',
'sortable' => true,
'format' => 'date'
]
],
'pagination' => ['per_page' => 10, 'enabled' => true],
'search_field' => 'tone_name',
'search_placeholder' => 'Search tones...',
'actions' => ['delete_selected', 'export_selected', 'import', 'add_new'],
'bulk_actions' => ['delete', 'activate', 'deactivate'],
'row_actions' => ['edit', 'delete', 'duplicate', 'preview']
],
// Personalization Data Table
'personalize_data' => [
'table' => 'igny8_data',
'title' => 'Personalization Data',
'humanize_columns' => ['post_id', 'data_type', 'data', 'created_at'],
'columns' => [
'post_id' => [
'label' => 'Post ID',
'type' => 'number',
'sortable' => true,
'display_field' => 'post_title',
'join' => [
'table' => 'posts',
'on' => 'igny8_data.post_id = posts.ID',
'type' => 'LEFT'
]
],
'data_type' => [
'label' => 'Data Type',
'type' => 'text',
'sortable' => true,
'searchable' => true
],
'data' => [
'label' => 'Data',
'type' => 'json',
'sortable' => false,
'format' => 'json_preview'
],
'created_at' => [
'label' => 'Created',
'type' => 'date',
'sortable' => true,
'format' => 'datetime'
]
],
'pagination' => ['per_page' => 20, 'enabled' => true],
'search_field' => 'data_type',
'search_placeholder' => 'Search data types...',
'actions' => ['delete_selected', 'export_selected'],
'bulk_actions' => ['delete'],
'row_actions' => ['view', 'delete']
],
// Personalization Variations Table
'personalize_variations' => [
'table' => 'igny8_variations',
'title' => 'Content Variations',
'humanize_columns' => ['post_id', 'fields_hash', 'content', 'created_at'],
'columns' => [
'post_id' => [
'label' => 'Post ID',
'type' => 'number',
'sortable' => true,
'display_field' => 'post_title',
'join' => [
'table' => 'posts',
'on' => 'igny8_variations.post_id = posts.ID',
'type' => 'LEFT'
]
],
'fields_hash' => [
'label' => 'Fields Hash',
'type' => 'text',
'sortable' => true,
'format' => 'hash_preview'
],
'content' => [
'label' => 'Content',
'type' => 'text',
'sortable' => false,
'format' => 'content_preview'
],
'created_at' => [
'label' => 'Created',
'type' => 'date',
'sortable' => true,
'format' => 'datetime'
]
],
'pagination' => ['per_page' => 20, 'enabled' => true],
'search_field' => 'fields_hash',
'search_placeholder' => 'Search variations...',
'actions' => ['delete_selected', 'export_selected'],
'bulk_actions' => ['delete'],
'row_actions' => ['view', 'edit', 'delete']
]
];