array(
'label' => __('Pageviews This Month', 'allaccessible'),
'icon' => '
',
),
'ai_images_monthly' => array(
'label' => __('AI Image Alt Text', 'allaccessible'),
'icon' => '
',
),
'audit_runs_monthly' => array(
'label' => __('Accessibility Audits', 'allaccessible'),
'icon' => '
',
),
'reports_monthly' => array(
'label' => __('Compliance Reports', 'allaccessible'),
'icon' => '
',
),
);
foreach ($metrics_to_show as $key => $config) {
if (!isset($usage->$key)) continue;
$metric = $usage->$key;
$current = $metric->current;
$limit = $metric->limit;
$percent = $metric->percent;
$exceeded = $metric->exceeded;
// Determine color based on usage
if ($exceeded) {
$bar_color = 'aacx-bg-red-500';
$text_color = 'aacx-text-red-600';
$bg_color = 'aacx-bg-red-50';
} elseif ($percent >= 80) {
$bar_color = 'aacx-bg-orange-500';
$text_color = 'aacx-text-orange-600';
$bg_color = 'aacx-bg-orange-50';
} elseif ($percent >= 50) {
$bar_color = 'aacx-bg-yellow-500';
$text_color = 'aacx-text-yellow-600';
$bg_color = 'aacx-bg-yellow-50';
} else {
$bar_color = 'aacx-bg-aacx-secondary-500';
$text_color = 'aacx-text-aacx-secondary-600';
$bg_color = 'aacx-bg-aacx-secondary-50';
}
// Check if feature is locked (limit = 0)
$is_locked = ($limit === 0);
?>
⚠️
= 80): ?>
⚠️ remaining)); ?>
remaining)); ?>
→
→