Skip to content
Merged
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
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
- name: Run Plugin Check
uses: wordpress/plugin-check-action@v1
with:
slug: open-trust-center-by-ettic
ignore-warnings: true
exclude-directories: 'dist'
exclude-files: '.phpstan-bootstrap.php'
Expand Down Expand Up @@ -95,16 +96,16 @@ jobs:

- name: Regenerate POT
run: |
wp i18n make-pot . languages/opentrust.pot \
--slug=opentrust \
--domain=opentrust \
wp i18n make-pot . languages/open-trust-center-by-ettic.pot \
--slug=open-trust-center-by-ettic \
--domain=open-trust-center-by-ettic \
--exclude=dist,vendor,node_modules,languages \
--allow-root

- name: Verify POT is up to date
run: |
if ! git diff --exit-code -I 'POT-Creation-Date' -- languages/opentrust.pot; then
echo "::error::languages/opentrust.pot is stale. Run \`wp i18n make-pot . languages/opentrust.pot --slug=opentrust --domain=opentrust --exclude=dist,vendor,node_modules,languages\` locally and commit the result."
if ! git diff --exit-code -I 'POT-Creation-Date' -- languages/open-trust-center-by-ettic.pot; then
echo "::error::languages/open-trust-center-by-ettic.pot is stale. Run \`wp i18n make-pot . languages/open-trust-center-by-ettic.pot --slug=open-trust-center-by-ettic --domain=open-trust-center-by-ettic --exclude=dist,vendor,node_modules,languages\` locally and commit the result."
exit 1
fi
echo "OK: POT is in sync with source."
Expand All @@ -120,12 +121,13 @@ jobs:
run: |
set -euo pipefail

header_version=$(grep -E '^\s*\*\s*Version:' opentrust.php | head -1 | sed -E 's/.*Version:\s*//' | tr -d '[:space:]')
constant_version=$(grep -E "define\('OPENTRUST_VERSION'" opentrust.php | sed -E "s/.*'OPENTRUST_VERSION',[[:space:]]*'([^']+)'.*/\1/")
plugin_file=open-trust-center-by-ettic.php
header_version=$(grep -E '^\s*\*\s*Version:' "$plugin_file" | head -1 | sed -E 's/.*Version:\s*//' | tr -d '[:space:]')
constant_version=$(grep -E "define\('ETTIC_OTC_VERSION'" "$plugin_file" | sed -E "s/.*'ETTIC_OTC_VERSION',[[:space:]]*'([^']+)'.*/\1/")
readme_version=$(grep -E '^Stable tag:' readme.txt | sed -E 's/Stable tag:\s*//' | tr -d '[:space:]')

echo "opentrust.php header: $header_version"
echo "OPENTRUST_VERSION: $constant_version"
echo "$plugin_file header: $header_version"
echo "ETTIC_OTC_VERSION: $constant_version"
echo "readme.txt Stable tag: $readme_version"

if [[ -z "$header_version" || -z "$constant_version" || -z "$readme_version" ]]; then
Expand Down
20 changes: 10 additions & 10 deletions .phpstan-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

declare(strict_types=1);

if (!defined('OPENTRUST_VERSION')) {
define('OPENTRUST_VERSION', '1.0.0');
if (!defined('ETTIC_OTC_VERSION')) {
define('ETTIC_OTC_VERSION', '1.0.0');
}
if (!defined('OPENTRUST_PLUGIN_DIR')) {
define('OPENTRUST_PLUGIN_DIR', __DIR__ . '/');
if (!defined('ETTIC_OTC_PLUGIN_DIR')) {
define('ETTIC_OTC_PLUGIN_DIR', __DIR__ . '/');
}
if (!defined('OPENTRUST_PLUGIN_URL')) {
define('OPENTRUST_PLUGIN_URL', 'https://example.com/wp-content/plugins/opentrust/');
if (!defined('ETTIC_OTC_PLUGIN_URL')) {
define('ETTIC_OTC_PLUGIN_URL', 'https://example.com/wp-content/plugins/open-trust-center-by-ettic/');
}
if (!defined('OPENTRUST_PLUGIN_FILE')) {
define('OPENTRUST_PLUGIN_FILE', __DIR__ . '/opentrust.php');
if (!defined('ETTIC_OTC_PLUGIN_FILE')) {
define('ETTIC_OTC_PLUGIN_FILE', __DIR__ . '/open-trust-center-by-ettic.php');
}
if (!defined('OPENTRUST_DB_VERSION')) {
define('OPENTRUST_DB_VERSION', 2);
if (!defined('ETTIC_OTC_DB_VERSION')) {
define('ETTIC_OTC_DB_VERSION', 1);
}
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

# OpenTrust
# Open Trust Center by Ettic

**A self-hosted, open-source trust center plugin for WordPress.**

Expand All @@ -9,15 +9,15 @@ Publish security policies, subprocessors, certifications, and data practices on
[![License: GPL v2 or later](https://img.shields.io/badge/License-GPLv2%2B-blue.svg)](LICENSE)
[![PHP 8.1+](https://img.shields.io/badge/PHP-8.1%2B-777BB4.svg)](https://www.php.net/)
[![WordPress 6.0+](https://img.shields.io/badge/WordPress-6.0%2B-21759B.svg)](https://wordpress.org/)
[![WordPress Plugin Version](https://img.shields.io/wordpress/plugin/v/opentrust?style=flat-square)](https://wordpress.org/plugins/opentrust/)
[![Tested WP Version](https://img.shields.io/wordpress/plugin/tested/opentrust?style=flat-square)](https://wordpress.org/plugins/opentrust/)
[![Downloads](https://img.shields.io/wordpress/plugin/dt/opentrust?style=flat-square)](https://wordpress.org/plugins/opentrust/advanced/)
[![WordPress Plugin Version](https://img.shields.io/wordpress/plugin/v/open-trust-center-by-ettic?style=flat-square)](https://wordpress.org/plugins/open-trust-center-by-ettic/)
[![Tested WP Version](https://img.shields.io/wordpress/plugin/tested/open-trust-center-by-ettic?style=flat-square)](https://wordpress.org/plugins/open-trust-center-by-ettic/)
[![Downloads](https://img.shields.io/wordpress/plugin/dt/open-trust-center-by-ettic?style=flat-square)](https://wordpress.org/plugins/open-trust-center-by-ettic/advanced/)

</div>

---

OpenTrust is a self-hosted, open-source trust center for WordPress. Procurement teams want a URL they can read. Buyers want receipts. Auditors want a version trail. OpenTrust gives you all three on a branded page that lives on your own WordPress site.
Open Trust Center by Ettic is a self-hosted, open-source trust center for WordPress. Procurement teams want a URL they can read. Buyers want receipts. Auditors want a version trail. Open Trust Center by Ettic gives you all three on a branded page that lives on your own WordPress site.

## What's inside

Expand All @@ -31,14 +31,14 @@ OpenTrust is a self-hosted, open-source trust center for WordPress. Procurement

## Install

**From WordPress.org**: coming soon at https://wordpress.org/plugins/opentrust/ (currently in review).
**From WordPress.org**: coming soon at https://wordpress.org/plugins/open-trust-center-by-ettic/ (currently in review).

**Manually:**

1. Download the latest release from [Releases](../../releases).
2. WP Admin → Plugins → Add New → Upload Plugin → upload the zip → Activate.
3. Visit OpenTrust in the admin sidebar to set your accent colour, logo, and company name.
4. Add content under **OpenTrust → Policies / Certifications / Subprocessors / Data Practices**.
3. Visit Open Trust Center in the admin sidebar to set your accent colour, logo, and company name.
4. Add content under **Open Trust Center → Policies / Certifications / Subprocessors / Data Practices**.
5. Visit `/trust-center/` on your site.

## AI chat
Expand All @@ -49,7 +49,7 @@ It only ever answers from what you've published — it can't retrieve a document

To turn it on:

1. **OpenTrust → Settings → AI Chat**
1. **Open Trust Center → Settings → AI Chat**
2. Pick a provider, paste an API key (encrypted at rest with libsodium before it touches the database), and pick a model.
3. Set the daily/monthly token budgets you're comfortable with.
4. Optional: enable Cloudflare Turnstile in the same tab for bot defence.
Expand All @@ -60,7 +60,7 @@ There's no SaaS subscription. You only pay your AI provider for tokens consumed
## Privacy by design

- **Zero telemetry, zero analytics, zero licence checks.** The only outbound HTTP calls the plugin can make are AI provider requests you configure, and they go through an SSRF host allowlist.
- **No PII in logs.** The optional `wp_opentrust_chat_log` table stores only short hashed identifiers — never raw IPs, emails, sessions, user agents, or referers. The privacy posture is enforced by the schema itself.
- **No PII in logs.** The optional `wp_ettic_otc_chat_log` table stores only short hashed identifiers — never raw IPs, emails, sessions, user agents, or referrers. The privacy posture is enforced by the schema itself.
- **Encrypted secrets.** API keys and the Cloudflare Turnstile secret are encrypted at rest with libsodium `secretbox`, salted from `wp_salt('auth')`. Rotating `AUTH_KEY` invalidates every stored secret atomically.
- **Theme-isolated rendering.** The trust center intercepts at `template_redirect`, outputs a complete standalone HTML document with inlined CSS, and exits. Your theme's stylesheet, header, footer, and JavaScript never load.
- **Capability-checked admin actions** with nonce verification on every save handler.
Expand Down Expand Up @@ -114,7 +114,7 @@ Ships with a `.pot` template and a starter Dutch (nl_NL) translation. WPML and P
Translators can regenerate the template from source:

```bash
wp i18n make-pot . languages/opentrust.pot --domain=opentrust
wp i18n make-pot . languages/open-trust-center-by-ettic.pot --domain=open-trust-center-by-ettic
```

Contribute a translation at [translate.wordpress.org](https://translate.wordpress.org/) once the plugin is live there.
Expand Down
Loading
Loading