Files
igny8/igny8-wp-plugin-for-reference-olny/modules/planner/clusters.php
2025-11-09 10:27:02 +00:00

85 lines
3.2 KiB
PHP

<?php
/**
* ==========================
* 🔐 IGNY8 FILE RULE HEADER
* ==========================
* @file : clusters.php
* @location : modules/planner/
* @type : Clusters Management Page
* @scope : Planner Module
* @allowed : Keyword clustering, content grouping, and cluster management
* @reusability : Planner Module
* @notes : Configuration-driven clusters management interface using complete component system
*
* @package Igny8Compact
* @since 1.0.0
*/
// Prevent direct access
if (!defined('ABSPATH')) {
exit;
}
// Set module variables
$GLOBALS['current_submodule'] = 'clusters';
$GLOBALS['current_module'] = 'planner';
// Load all required components
require_once plugin_dir_path(__FILE__) . '../../modules/components/filters-tpl.php';
require_once plugin_dir_path(__FILE__) . '../../modules/components/actions-tpl.php';
require_once plugin_dir_path(__FILE__) . '../../modules/components/table-tpl.php';
require_once plugin_dir_path(__FILE__) . '../../modules/components/pagination-tpl.php';
// Set table ID for components
$table_id = 'planner_clusters';
?>
<div class="igny8-module-page">
<div class="igny8-container">
<!-- Clusters Management Section -->
<div class="igny8-dashboard-section">
<div class="igny8-standard-header">
<div class="igny8-card-header-content">
<div class="igny8-card-title-text">
<h3>Keyword Clusters</h3>
<p class="igny8-card-subtitle">Organize keywords into content clusters for better SEO strategy</p>
</div>
<div class="igny8-card-icon">
<span class="dashicons dashicons-networking igny8-dashboard-icon-lg igny8-dashboard-icon-green"></span>
</div>
</div>
</div>
<!-- Complete Submodule Interface -->
<?php
// Render all components in correct order
echo igny8_render_filters($table_id);
echo igny8_render_table_actions($table_id);
echo igny8_render_table($table_id);
echo igny8_render_pagination($table_id);
// Get cluster options for dropdowns
$cluster_options = igny8_get_cluster_options();
// Load filters configuration for JavaScript
$filters_config = require plugin_dir_path(__FILE__) . '../../modules/config/filters-config.php';
// Localize script for table initialization
wp_localize_script('igny8-admin-js', 'IGNY8_PAGE', [
'tableId' => $table_id,
'module' => 'planner',
'submodule' => 'clusters',
'ajaxUrl' => admin_url('admin-ajax.php'),
'nonce' => wp_create_nonce('igny8_planner_settings'),
'defaultPerPage' => get_option('igny8_records_per_page', 20),
'clusterOptions' => $cluster_options,
'filtersConfig' => $filters_config,
'cronKey' => igny8_needs_cron_functionality() ? igny8_get_or_generate_cron_key() : null
]);
?>
</div>
</div>
</div>