diff --git a/assets/css/admin.css b/assets/css/admin.css index f9c415c..e4fd9b0 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -2,6 +2,11 @@ * OpenTrust admin styles. */ +/* Server-rendered visibility toggle. jQuery .show()/.hide() override via inline style. */ +.ot-hidden { + display: none; +} + /* Accent contrast warning */ .ot-accent-warning { display: flex; diff --git a/includes/class-opentrust-admin-ai.php b/includes/class-opentrust-admin-ai.php index 23e8ddf..f0be2f9 100644 --- a/includes/class-opentrust-admin-ai.php +++ b/includes/class-opentrust-admin-ai.php @@ -80,8 +80,8 @@ public function render_ai_tab(array $settings): void { ' . esc_html(ucfirst($active_provider)) . '' // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + wp_kses(__('You are currently using %s. Only Anthropic uses a structural Citations API — every other provider relies on prompted citation tags the model can ignore or fabricate. For a published trust center, switch to Anthropic below.', 'opentrust'), ['strong' => []]), + esc_html(ucfirst($active_provider)) ); ?>

diff --git a/includes/class-opentrust-admin-questions.php b/includes/class-opentrust-admin-questions.php index a8bd6a5..29580c9 100644 --- a/includes/class-opentrust-admin-questions.php +++ b/includes/class-opentrust-admin-questions.php @@ -90,7 +90,7 @@ public function render_page(): void {

-
+
✓ @@ -187,15 +187,19 @@ public function render_page(): void {
['href' => true, 'class' => true, 'title' => true, 'aria-current' => true, 'aria-label' => true], + 'span' => ['class' => true, 'aria-current' => true], + ]; + echo wp_kses((string) paginate_links([ 'base' => add_query_arg('paged', '%#%', $base), 'format' => '', 'current' => $filters['page'], 'total' => $pages, 'prev_text' => '‹', 'next_text' => '›', - ]); + ]), $pagination_allowed); ?>
diff --git a/includes/class-opentrust-admin-settings.php b/includes/class-opentrust-admin-settings.php index 5b6b676..7b300fa 100644 --- a/includes/class-opentrust-admin-settings.php +++ b/includes/class-opentrust-admin-settings.php @@ -188,30 +188,22 @@ private function render_input_field(string $type, array $args, array $extra_attr $key = $args['key']; $value = $settings[$key] ?? ''; - $attr_html = ''; - foreach ($extra_attrs as $name => $val) { - $attr_html .= ' ' . $name . '="' . esc_attr($val) . '"'; + if ($type === 'textarea') { + echo '', - esc_attr($key), - esc_textarea($value), - $attr_html // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- attribute values escaped above; names are hardcoded - ); + echo '>' . esc_textarea($value) . ''; } else { - printf( - '', - esc_attr($key), - esc_attr($value), - $attr_html, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- attribute values escaped above; names are hardcoded - esc_attr($type) - ); + echo '>'; } if (!empty($args['description'])) { - printf('

%s

', esc_html($args['description'])); + echo '

' . esc_html($args['description']) . '

'; } } @@ -224,7 +216,7 @@ public function render_color_field(array $args): void { esc_attr($value) ); ?> -