[ 'label' => esc_html__('Dashboard', 'king-addons'), 'icon' => 'dashicons-chart-line', ], 'tables' => [ 'label' => esc_html__('All Tables', 'king-addons'), 'icon' => 'dashicons-grid-view', ], 'add' => [ 'label' => esc_html__('Add New', 'king-addons'), 'icon' => 'dashicons-plus', ], 'templates' => [ 'label' => esc_html__('Templates', 'king-addons'), 'icon' => 'dashicons-layout', ], 'settings' => [ 'label' => esc_html__('Settings', 'king-addons'), 'icon' => 'dashicons-admin-generic', ], 'import-export' => [ 'label' => esc_html__('Import Export', 'king-addons'), 'icon' => 'dashicons-upload', ], ]; $base_url = admin_url('admin.php?page=king-addons-table-builder'); $current_view = array_key_exists($view, $tabs) ? $view : 'dashboard'; $message_code = isset($_GET['message']) ? sanitize_key($_GET['message']) : ''; $messages = [ 'saved' => esc_html__('Table saved successfully.', 'king-addons'), 'deleted' => esc_html__('Table deleted.', 'king-addons'), 'duplicated' => esc_html__('Table duplicated.', 'king-addons'), 'imported' => esc_html__('Table imported successfully.', 'king-addons'), 'error_save' => esc_html__('Unable to save table.', 'king-addons'), 'error_not_found' => esc_html__('Table not found.', 'king-addons'), 'error_import' => esc_html__('Import failed. Check your CSV file.', 'king-addons'), ]; $has_message = $message_code !== '' && isset($messages[$message_code]); $is_error_message = strpos($message_code, 'error_') === 0; ?>

$tab) : ?>