diff --git a/includes/panel/class-prv-ai-visibility-panel.php b/includes/panel/class-prv-ai-visibility-panel.php index ae4a0ae..752845d 100644 --- a/includes/panel/class-prv-ai-visibility-panel.php +++ b/includes/panel/class-prv-ai-visibility-panel.php @@ -95,12 +95,12 @@ class PRV_Ai_Visibility_Panel implements PRV_Dashboard_Panel { /** * Prepare bento-band data and delegate rendering to PRV_Dashboard_Renderer. * - * @param array $trendline Trendline data. - * @param array $standings Standings map. - * @param string $last_run_at Formatted timestamp. - * @param float $mtd_cost Month-to-date spend USD. - * @param float $cap Monthly cap USD. - * @param array $last_run_counts Per-model health. + * @param array $trendline Trendline data points from PRV_Ai_Visibility_Collector. + * @param array $standings Per-peptide standings map. + * @param string $last_run_at Formatted run timestamp or "Never". + * @param float $mtd_cost Month-to-date spend in USD. + * @param float $cap Monthly budget cap in USD. + * @param array $last_run_counts Per-model health map (slug → {health_status}). * * @return void */ @@ -174,7 +174,8 @@ class PRV_Ai_Visibility_Panel implements PRV_Dashboard_Panel { echo ''; echo '' . esc_html( (string) $row['label'] ) . ''; - echo '' . $cited_dot . ' ' . $cited_label . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped — dot is HTML entity; label escaped above; class esc_attr'd + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- dot is a fixed HTML entity; label is escaped by esc_html__() above; class is esc_attr'd + echo '' . $cited_dot . ' ' . $cited_label . ''; echo '' . esc_html( $position ) . ''; echo '' . wp_kses_post( $domains ) . ''; echo ''; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 28d3d35..1f82da1 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -137,6 +137,7 @@ function current_time( string $type, bool $gmt = false ): string { function home_url( string $path = '' ): string { return 'http://example.test' . $path; } function __( string $text, string $domain = 'default' ): string { return $text; } +function _n( string $single, string $plural, int $number, string $domain = 'default' ): string { return 1 === $number ? $single : $plural; } function esc_html( string $text ): string { return htmlspecialchars( $text, ENT_QUOTES ); } function esc_html__( string $text, string $domain = 'default' ): string { return esc_html( $text ); } function esc_attr( string $text ): string { return htmlspecialchars( $text, ENT_QUOTES ); }