Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 28 additions & 29 deletions languages/opentrust.pot
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2026-05-14T14:04:32+00:00\n"
"POT-Creation-Date: 2026-05-14T15:53:44+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.12.0\n"
"X-Domain: opentrust\n"
Expand Down Expand Up @@ -765,7 +765,7 @@ msgstr ""
#: includes/class-opentrust-cpt.php:250
#: templates/chat.php:45
#: templates/partials/hero.php:55
#: templates/trust-center.php:107
#: templates/trust-center.php:70
msgid "Policies"
msgstr ""

Expand All @@ -776,7 +776,7 @@ msgstr ""
#: templates/chat.php:47
#: templates/partials/hero.php:61
#: templates/partials/subprocessors.php:20
#: templates/trust-center.php:109
#: templates/trust-center.php:72
msgid "Subprocessors"
msgstr ""

Expand All @@ -786,7 +786,7 @@ msgstr ""
#: includes/class-opentrust-cpt.php:349
#: templates/chat.php:48
#: templates/partials/data-practices.php:34
#: templates/trust-center.php:110
#: templates/trust-center.php:73
msgid "Data Practices"
msgstr ""

Expand All @@ -812,7 +812,7 @@ msgstr ""

#: includes/class-opentrust-admin-settings.php:597
#: templates/chat.php:60
#: templates/trust-center.php:111
#: templates/trust-center.php:74
msgid "Contact"
msgstr ""

Expand Down Expand Up @@ -975,7 +975,7 @@ msgstr ""
#: includes/class-opentrust-cpt.php:283
#: templates/chat.php:46
#: templates/partials/hero.php:49
#: templates/trust-center.php:108
#: templates/trust-center.php:71
msgid "Certifications"
msgstr ""

Expand Down Expand Up @@ -1296,7 +1296,7 @@ msgstr ""

#: includes/class-opentrust-cpt.php:374
#: templates/chat.php:61
#: templates/trust-center.php:112
#: templates/trust-center.php:75
msgid "FAQ"
msgstr ""

Expand Down Expand Up @@ -1772,7 +1772,7 @@ msgid "Page not found."
msgstr ""

#: includes/class-opentrust-render.php:271
#: templates/partials/policy-single.php:54
#: templates/partials/policy-single.php:46
msgid "Back to Trust Center"
msgstr ""

Expand Down Expand Up @@ -1807,7 +1807,7 @@ msgstr[1] ""
#. translators: %s = formatted date
#. translators: %s: policy last updated date
#: includes/class-opentrust-render.php:467
#: templates/partials/policy-single.php:111
#: templates/partials/policy-single.php:103
#, php-format
msgid "Updated %s"
msgstr ""
Expand Down Expand Up @@ -1894,7 +1894,7 @@ msgid "Actions"
msgstr ""

#: includes/class-opentrust-version.php:169
#: templates/partials/policy-single.php:174
#: templates/partials/policy-single.php:166
msgid "Current"
msgstr ""

Expand Down Expand Up @@ -2166,18 +2166,17 @@ msgid "Ask %s — Trust Center"
msgstr ""

#: templates/chat.php:100
#: templates/trust-center.php:101
#: templates/trust-center.php:111
msgid "Skip to content"
msgstr ""

#: templates/chat.php:102
#: templates/partials/policy-single.php:36
#: templates/trust-center.php:114
#: templates/partials/nav.php:22
msgid "Trust center navigation"
msgstr ""

#: templates/chat.php:131
#: templates/trust-center.php:144
#: templates/partials/nav.php:53
msgid "Ask AI"
msgstr ""

Expand Down Expand Up @@ -2300,7 +2299,7 @@ msgid "Copied"
msgstr ""

#: templates/chat.php:343
#: templates/partials/policy-single.php:139
#: templates/partials/policy-single.php:131
msgid "Print"
msgstr ""

Expand Down Expand Up @@ -2482,26 +2481,26 @@ msgid "Last Updated"
msgstr ""

#: templates/partials/policies.php:89
#: templates/partials/policy-single.php:116
#: templates/partials/policy-single.php:108
msgid "Framework citations"
msgstr ""

#. translators: %s: policy version number
#: templates/partials/policies.php:99
#: templates/partials/policy-single.php:94
#: templates/partials/policy-single.php:86
#, php-format
msgid "v%s"
msgstr ""

#. translators: %s: human-readable file size
#: templates/partials/policies.php:106
#: templates/partials/policy-single.php:130
#: templates/partials/policy-single.php:122
#, php-format
msgid "Download PDF (%s)"
msgstr ""

#: templates/partials/policies.php:108
#: templates/partials/policy-single.php:132
#: templates/partials/policy-single.php:124
msgid "Download PDF"
msgstr ""

Expand All @@ -2512,36 +2511,36 @@ msgid "View %s"
msgstr ""

#. translators: %1$s: version number, %2$s: link to current version
#: templates/partials/policy-single.php:63
#: templates/partials/policy-single.php:55
#, php-format
msgid "You are viewing version %1$s. %2$s"
msgstr ""

#: templates/partials/policy-single.php:65
#: templates/partials/policy-single.php:78
#: templates/partials/policy-single.php:57
#: templates/partials/policy-single.php:70
msgid "View current version"
msgstr ""

#. translators: %1$s: effective date, %2$s: link to previous version
#: templates/partials/policy-single.php:75
#: templates/partials/policy-single.php:67
#, php-format
msgid "This version takes effect on %1$s. %2$s"
msgstr ""

#. translators: %s: policy effective date
#: templates/partials/policy-single.php:105
#: templates/partials/policy-single.php:97
#, php-format
msgid "Effective %s"
msgstr ""

#. translators: %d: number of policy versions
#: templates/partials/policy-single.php:150
#: templates/partials/policy-single.php:142
#, php-format
msgid "Version history (%d)"
msgstr ""

#. translators: %d: version number
#: templates/partials/policy-single.php:166
#: templates/partials/policy-single.php:158
#, php-format
msgid "v%d"
msgstr ""
Expand All @@ -2567,16 +2566,16 @@ msgstr ""
msgid "Transparency and security you can trust."
msgstr ""

#: templates/trust-center.php:196
#: templates/trust-center.php:165
msgid "Trust center content is being prepared. Check back soon."
msgstr ""

#. translators: %s: company name
#: templates/trust-center.php:212
#: templates/trust-center.php:181
#, php-format
msgid "© %1$s %2$s. All rights reserved."
msgstr ""

#: templates/trust-center.php:220
#: templates/trust-center.php:189
msgid "Powered by OpenTrust"
msgstr ""
58 changes: 58 additions & 0 deletions templates/partials/nav.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?php
/**
* Shared trust center navigation.
*
* Variables expected from parent:
* $ot_base_url, $ot_logo_url, $ot_company_name, $ot_ai_enabled, $ot_nav_items
* $ot_nav_anchor_base — prefix for section links ('' on the main page so they
* stay same-page anchors; the trust center URL on the
* single policy page so they jump back home).
* $ot_nav_scrollspy — whether to wire links into the JS scroll-spy.
*/

declare(strict_types=1);

defined('ABSPATH') || exit;

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variables are local scope via include()

$ot_nav_anchor_base = $ot_nav_anchor_base ?? '';
$ot_nav_scrollspy = $ot_nav_scrollspy ?? false;
?>
<nav class="ot-nav" aria-label="<?php esc_attr_e('Trust center navigation', 'opentrust'); ?>">
<div class="ot-container ot-nav__inner">
<a href="<?php echo esc_url($ot_base_url); ?>" class="ot-nav__brand">
<?php if ($ot_logo_url): ?>
<img class="ot-nav__brand-logo"
src="<?php echo esc_url($ot_logo_url); ?>"
alt="<?php echo esc_attr($ot_company_name ?: get_bloginfo('name')); ?>">
<?php else: ?>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
<span class="ot-nav__brand-name"><?php echo esc_html($ot_company_name ?: get_bloginfo('name')); ?></span>
<?php endif; ?>
</a>
<?php if (count($ot_nav_items) > 1): ?>
<div class="ot-nav__links">
<?php foreach ($ot_nav_items as $ot_id => $ot_label): ?>
<a href="<?php echo esc_url($ot_nav_anchor_base . '#ot-' . $ot_id); ?>"
class="ot-nav__link"<?php echo $ot_nav_scrollspy ? ' data-ot-nav' : ''; ?>>
<?php echo esc_html($ot_label); ?>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if ($ot_ai_enabled): ?>
<div class="ot-nav__cta">
<a href="<?php echo esc_url(trailingslashit($ot_base_url) . 'ask/'); ?>" class="ot-nav__ask">
<svg class="ot-nav__ask-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>
<path d="M20 3v4"/>
<path d="M22 5h-4"/>
<path d="M4 17v2"/>
<path d="M5 18H3"/>
</svg>
<span class="ot-nav__ask-label"><?php esc_html_e('Ask AI', 'opentrust'); ?></span>
</a>
</div>
<?php endif; ?>
</div>
</nav>
20 changes: 6 additions & 14 deletions templates/partials/policy-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,13 @@
$ot_modified_date = wp_date(get_option('date_format'), strtotime($ot_policy->post_modified));

$ot_current_url = trailingslashit($ot_base_url) . 'policy/' . $ot_policy->post_name . '/';
?>

<nav class="ot-nav" aria-label="<?php esc_attr_e('Trust center navigation', 'opentrust'); ?>">
<div class="ot-container ot-nav__inner">
<a href="<?php echo esc_url($ot_base_url); ?>" class="ot-nav__brand">
<?php if ($ot_logo_url): ?>
<img class="ot-nav__brand-logo"
src="<?php echo esc_url($ot_logo_url); ?>"
alt="<?php echo esc_attr($ot_company_name); ?>">
<?php else: ?>
<span class="ot-nav__brand-name"><?php echo esc_html($ot_company_name ?: get_bloginfo('name')); ?></span>
<?php endif; ?>
</a>
</div>
</nav>
// Section links jump back to the main trust center page; scroll-spy is off
// since those sections don't exist on this page.
$ot_nav_anchor_base = $ot_base_url;
$ot_nav_scrollspy = false;
include OPENTRUST_PLUGIN_DIR . 'templates/partials/nav.php';
?>

<main id="ot-main" class="ot-policy-single">
<div class="ot-container ot-container--narrow">
Expand Down
59 changes: 14 additions & 45 deletions templates/trust-center.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@
$ot_accent_l_safe = !empty($ot_settings['accent_force_exact'])
? (int) $ot_hsl['l']
: OpenTrust::accent_safe_lightness((string) ($ot_settings['accent_color'] ?? '#2563EB'));

// Navigation items — shared by the main page and the single policy view so
// the menu stays put when a visitor drills into a policy.
$ot_nav_items = [];
if (!empty($ot_visible['policies']) && $ot_policy_count) $ot_nav_items['policies'] = __('Policies', 'opentrust');
if (!empty($ot_visible['certifications']) && $ot_cert_count) $ot_nav_items['certifications'] = __('Certifications', 'opentrust');
if (!empty($ot_visible['subprocessors']) && $ot_sub_count) $ot_nav_items['subprocessors'] = __('Subprocessors', 'opentrust');
if (!empty($ot_visible['data_practices']) && count($ot_data['data_practices'] ?? [])) $ot_nav_items['data-practices'] = __('Data Practices', 'opentrust');
if (!empty($ot_visible['contact']) && $ot_contact_has_content) $ot_nav_items['contact'] = __('Contact', 'opentrust');
if (!empty($ot_visible['faqs']) && $ot_faq_count) $ot_nav_items['faqs'] = __('FAQ', 'opentrust');
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
Expand Down Expand Up @@ -103,51 +113,10 @@
<?php
if ($ot_view === 'main') {
// ── Navigation (above hero) ──
$ot_nav_items = [];
if (!empty($ot_visible['policies']) && $ot_policy_count) $ot_nav_items['policies'] = __('Policies', 'opentrust');
if (!empty($ot_visible['certifications']) && $ot_cert_count) $ot_nav_items['certifications'] = __('Certifications', 'opentrust');
if (!empty($ot_visible['subprocessors']) && $ot_sub_count) $ot_nav_items['subprocessors'] = __('Subprocessors', 'opentrust');
if (!empty($ot_visible['data_practices']) && count($ot_data['data_practices'] ?? [])) $ot_nav_items['data-practices'] = __('Data Practices', 'opentrust');
if (!empty($ot_visible['contact']) && $ot_contact_has_content) $ot_nav_items['contact'] = __('Contact', 'opentrust');
if (!empty($ot_visible['faqs']) && $ot_faq_count) $ot_nav_items['faqs'] = __('FAQ', 'opentrust');
?>
<nav class="ot-nav" aria-label="<?php esc_attr_e('Trust center navigation', 'opentrust'); ?>">
<div class="ot-container ot-nav__inner">
<a href="<?php echo esc_url($ot_base_url); ?>" class="ot-nav__brand">
<?php if ($ot_logo_url): ?>
<img class="ot-nav__brand-logo"
src="<?php echo esc_url($ot_logo_url); ?>"
alt="<?php echo esc_attr($ot_company_name); ?>">
<?php else: ?>
<span class="ot-nav__brand-name"><?php echo esc_html($ot_company_name ?: get_bloginfo('name')); ?></span>
<?php endif; ?>
</a>
<?php if (count($ot_nav_items) > 1): ?>
<div class="ot-nav__links">
<?php foreach ($ot_nav_items as $ot_id => $ot_label): ?>
<a href="#ot-<?php echo esc_attr($ot_id); ?>" class="ot-nav__link" data-ot-nav>
<?php echo esc_html($ot_label); ?>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if ($ot_ai_enabled): ?>
<div class="ot-nav__cta">
<a href="<?php echo esc_url(trailingslashit($ot_base_url) . 'ask/'); ?>" class="ot-nav__ask">
<svg class="ot-nav__ask-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>
<path d="M20 3v4"/>
<path d="M22 5h-4"/>
<path d="M4 17v2"/>
<path d="M5 18H3"/>
</svg>
<span class="ot-nav__ask-label"><?php esc_html_e('Ask AI', 'opentrust'); ?></span>
</a>
</div>
<?php endif; ?>
</div>
</nav>
<?php
$ot_nav_anchor_base = '';
$ot_nav_scrollspy = true;
include OPENTRUST_PLUGIN_DIR . 'templates/partials/nav.php';

// ── Hero ──
include OPENTRUST_PLUGIN_DIR . 'templates/partials/hero.php';
?>
Expand Down
Loading