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
2 changes: 1 addition & 1 deletion assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@
* - `fields_review` → templates, amber highlight, "Verify" chip + notice
*
* All state is client-side. The bundle at window.EtticOTCCatalog is injected
* only on post-new.php for eotc_subprocessor / eotc_data_practice screens.
* only on post-new.php for ettotc_subprocessor / ettotc_data_practice screens.
*/
(function () {
'use strict';
Expand Down
4 changes: 2 additions & 2 deletions includes/class-ettic-otc-catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private static function load_catalog( string $file_basename, string $filter_name
* Return the default FAQ catalog as a list of question/answer pairs.
*
* Unlike the other catalogs, FAQ entries are seeded once into real
* `eotc_faq` posts on first activation and then owned by the user. This
* `ettotc_faq` posts on first activation and then owned by the user. This
* loader is only consulted by the seeder.
*
* @return array<string, array{question:string, answer:string}>
Expand Down Expand Up @@ -132,7 +132,7 @@ public static function faqs(): array {
}

/**
* Seed the default FAQs as published `eotc_faq` posts.
* Seed the default FAQs as published `ettotc_faq` posts.
*
* Gated by the `ettic_otc_faqs_seeded` option so deletions stick: once a
* site has been seeded, re-activating the plugin will not recreate the
Expand Down
4 changes: 2 additions & 2 deletions includes/class-ettic-otc-chat-summarizer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* AI-generated 2–3 sentence summaries for eotc_policy posts.
* AI-generated 2–3 sentence summaries for ettotc_policy posts.
*
* The agentic chat engine reads a slim corpus index in its system prompt;
* each policy line carries a one-paragraph summary used for routing decisions
Expand All @@ -11,7 +11,7 @@
*
* Lifecycle:
* - Gated by the `ai_auto_summarize` setting.
* - On every meaningful save_post for an eotc_policy, a wp_schedule_single_event
* - On every meaningful save_post for an ettotc_policy, a wp_schedule_single_event
* fires ~5 seconds later (debounce; doesn't block the editor save).
* - The cron handler calls whichever AI provider the operator configured
* for chat, using the same key. Result is persisted to postmeta and the
Expand Down
20 changes: 13 additions & 7 deletions includes/class-ettic-otc-cpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ final class Ettic_OTC_CPT {
* CPT slug constants. Use these everywhere instead of bare strings so a
* rename is one edit and a typo can't sneak through a `match` default arm.
*/
public const POLICY = 'eotc_policy';
public const CERTIFICATION = 'eotc_certification';
public const SUBPROCESSOR = 'eotc_subprocessor';
public const DATA_PRACTICE = 'eotc_data_practice';
public const FAQ = 'eotc_faq';
public const POLICY = 'ettotc_policy';
public const CERTIFICATION = 'ettotc_certification';
public const SUBPROCESSOR = 'ettotc_subprocessor';
public const DATA_PRACTICE = 'ettotc_data_practice';
public const FAQ = 'ettotc_faq';

/**
* Legacy CPT slugs accepted by the import/export back-compat remap.
* Two generations: v1.0.x used `ot_*`, v1.1.x used `opentr_*`. Both
* translate to the current `eotc_*` slugs on import.
* Generations: v1.0.x `ot_*`, v1.1.x `opentr_*`, early review build
* `eotc_*`. All translate to the current `ettotc_*` slugs on import.
*/
public const LEGACY_MAP = [
// v1.0.x
Expand All @@ -39,6 +39,12 @@ final class Ettic_OTC_CPT {
'opentr_subprocessor' => self::SUBPROCESSOR,
'opentr_data_practice' => self::DATA_PRACTICE,
'opentr_faq' => self::FAQ,
// early review build (eotc_*)
'eotc_policy' => self::POLICY,
'eotc_certification' => self::CERTIFICATION,
'eotc_subprocessor' => self::SUBPROCESSOR,
'eotc_data_practice' => self::DATA_PRACTICE,
'eotc_faq' => self::FAQ,
];

/**
Expand Down
2 changes: 1 addition & 1 deletion includes/class-ettic-otc-io.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ public static function read_zip(string $zip_path): array {

/**
* Rewrite legacy CPT slugs (v1.0.x `ot_*`, v1.1.x `opentr_*`) in an
* inbound manifest to the current `eotc_*` slugs. Touches top-level
* inbound manifest to the current `ettotc_*` slugs. Touches top-level
* record keys only — record bodies carry __post_ref values as UUIDs
* (not slugs) and resolve fine once the outer key is corrected. Phase 8
* extends Ettic_OTC_CPT::LEGACY_MAP with the v1.1.x entries.
Expand Down
2 changes: 1 addition & 1 deletion includes/data/certification-catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Certification catalog.
*
* Curated list of common compliance frameworks, regulations, and
* certifications shown in the admin typeahead on the eotc_certification
* certifications shown in the admin typeahead on the ettotc_certification
* create screen. Each entry sets `_ettic_otc_cert_type` to either `certified`
* (third-party audited, has a certificate with dates and an issuing body)
* or `compliant` (self-attested adherence to a standard or regulation).
Expand Down
2 changes: 1 addition & 1 deletion includes/data/data-practice-catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Data-practice catalog.
*
* Templates for common data-practice categories. Used by the admin typeahead
* on the eotc_data_practice create screen. Every entry is a starting point —
* on the ettotc_data_practice create screen. Every entry is a starting point —
* users must review legal basis, retention, and shared-with lists before
* publishing. All template fields live under `fields_review` so the UI marks
* them as "verify before publishing".
Expand Down
2 changes: 1 addition & 1 deletion includes/data/faq-catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Default FAQ catalog.
*
* Generic, content-agnostic glossary entries seeded into the eotc_faq CPT on
* Generic, content-agnostic glossary entries seeded into the ettotc_faq CPT on
* first plugin activation. These explain universal trust-center concepts and
* make no claims about the specific company running the plugin.
*
Expand Down
2 changes: 1 addition & 1 deletion includes/data/subprocessor-catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Subprocessor catalog.
*
* Curated list of common SaaS vendors with factual information that can be
* auto-filled into the eotc_subprocessor meta box from the admin typeahead.
* auto-filled into the ettotc_subprocessor meta box from the admin typeahead.
*
* Schema per entry:
* 'slug' => [
Expand Down
2 changes: 1 addition & 1 deletion languages/open-trust-center-by-ettic-nl_NL.po
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ msgstr ""

#. Plugin URI of the plugin
#: open-trust-center-by-ettic.php
msgid "https://plugins.ettic.nl/open-trust-center-by-ettic"
msgid "https://plugins.ettic.nl/opentrust"
msgstr ""

#. Description of the plugin
Expand Down
2 changes: 1 addition & 1 deletion languages/open-trust-center-by-ettic.pot
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ msgstr ""

#. Plugin URI of the plugin
#: open-trust-center-by-ettic.php
msgid "https://plugins.ettic.nl/open-trust-center-by-ettic"
msgid "https://plugins.ettic.nl/opentrust"
msgstr ""

#. Description of the plugin
Expand Down
6 changes: 3 additions & 3 deletions open-trust-center-by-ettic.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* Plugin Name: Open Trust Center by Ettic
* Plugin URI: https://plugins.ettic.nl/open-trust-center-by-ettic
* Plugin URI: https://plugins.ettic.nl/opentrust
* Description: A self-hosted, open-source trust center for publishing security policies, subprocessors, certifications, and data practices.
* Version: 1.2.0
* Version: 1.2.1
* Requires PHP: 8.1
* Requires at least: 6.0
* Author: Ettic
Expand All @@ -18,7 +18,7 @@

defined('ABSPATH') || exit;

define('ETTIC_OTC_VERSION', '1.2.0');
define('ETTIC_OTC_VERSION', '1.2.1');
define('ETTIC_OTC_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('ETTIC_OTC_PLUGIN_URL', plugin_dir_url(__FILE__));
define('ETTIC_OTC_PLUGIN_FILE', __FILE__);
Expand Down
17 changes: 13 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: trust-center, compliance, gdpr, privacy, subprocessors
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 1.2.0
Stable tag: 1.2.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -188,12 +188,18 @@ Not automatically — that's intentional. Auto-rendered PDFs from HTML almost al

== Changelog ==

= 1.2.1 =
WordPress.org review round 2 fixes.

* Fix: the `Plugin URI` header and the front-end "Powered by" footer link now point to a live page (`https://plugins.ettic.nl/opentrust`); the previous URL returned a 404.
* Change: the five custom post type slugs are renamed from `eotc_*` to `ettotc_*` — a clearer, ≥4-character prefix that stays within WordPress's 20-character `post_type` limit (`ettic_otc_certification` would be 23 and overflow). Export ZIPs from any earlier build are remapped to the new slugs automatically on import.

= 1.2.0 =
First release published to the WordPress.org plugin directory. The plugin previously circulated as `opentrust`; this release retires that name due to a third-party trademark conflict and migrates every internal identifier off the trademarked term.

* Change: plugin renamed to **Open Trust Center by Ettic**. New slug, new text domain, new internal namespace. PHP classes are now `Ettic_OTC_*`, options live under `ettic_otc_*`, postmeta under `_ettic_otc_*`, CPT slugs under `eotc_*`, CSS classes under `.ettic-otc-*`, REST namespace `ettic-otc/v1`.
* Change: plugin renamed to **Open Trust Center by Ettic**. New slug, new text domain, new internal namespace. PHP classes are now `Ettic_OTC_*`, options live under `ettic_otc_*`, postmeta under `_ettic_otc_*`, CPT slugs under `ettotc_*`, CSS classes under `.ettic-otc-*`, REST namespace `ettic-otc/v1`.
* Change: the v1.0.x → v1.1.x in-place database migration chain has been removed. This release is treated as a fresh install; the import/export feature (in `Open Trust Center → Settings → Import & Export`) is the supported migration path off any prior install.
* Compat: the importer in `Open Trust Center → Settings → Import & Export` accepts export ZIPs generated by **any** prior `opentrust` version (v1.0.x or v1.1.x) with full data fidelity. Postmeta keys (`_ot_*`, `_opentrust_*`) and CPT slugs (`ot_*`, `opentr_*`) are remapped to the new `_ettic_otc_*` / `eotc_*` identifiers on read.
* Compat: the importer in `Open Trust Center → Settings → Import & Export` accepts export ZIPs generated by **any** prior `opentrust` version (v1.0.x or v1.1.x) with full data fidelity. Postmeta keys (`_ot_*`, `_opentrust_*`) and CPT slugs (`ot_*`, `opentr_*`) are remapped to the new `_ettic_otc_*` / `ettotc_*` identifiers on read.
* Internal: bundled translation template regenerated against the new text domain.

**Upgrading from an `opentrust` install:** export your content + settings from the old plugin's Import & Export tab, deactivate the old plugin, install **Open Trust Center by Ettic**, and import the ZIPs into the new plugin. There is no in-place upgrade path — the namespaces are intentionally disjoint.
Expand Down Expand Up @@ -227,8 +233,11 @@ This release implements the fixes requested in round 1 of the WordPress.org plug

== Upgrade Notice ==

= 1.2.1 =
Review-compliance patch: fixes a 404 Plugin URI and renames the custom post type slugs from `eotc_*` to `ettotc_*`. No published installs are affected; import archives from earlier builds are remapped automatically.

= 1.2.0 =
The plugin is renamed to **Open Trust Center by Ettic** (was OpenTrust) due to a third-party trademark conflict. The slug, text domain, PHP namespace, options, postmeta, CPT slugs, and CSS classes all move to the new `ettic_otc` / `eotc_` / `ettic-otc-` namespace. **No automatic in-place upgrade from the previous `opentrust` plugin.** Migrate by exporting from the old install's Import & Export tab and importing the ZIPs into the new plugin — the importer reads v1.0.x and v1.1.x archives with full data fidelity.
The plugin is renamed to **Open Trust Center by Ettic** (was OpenTrust) due to a third-party trademark conflict. The slug, text domain, PHP namespace, options, postmeta, CPT slugs, and CSS classes all move to the new `ettic_otc` / `ettotc_` / `ettic-otc-` namespace. **No automatic in-place upgrade from the previous `opentrust` plugin.** Migrate by exporting from the old install's Import & Export tab and importing the ZIPs into the new plugin — the importer reads v1.0.x and v1.1.x archives with full data fidelity.

= 1.1.1 =
This release renames the plugin's postmeta keys and internal identifiers to a longer prefix for naming consistency. An automatic, idempotent database migration rewrites your existing postmeta to the new keys on the first load after upgrade, so no manual action is required. Post content, meta values, revisions, version history, and translation links are all preserved, and existing trust-center URLs are unaffected. A database backup before upgrading is recommended. If you maintain custom code that references the old `_ot_*` postmeta keys directly, update those references to the new `_opentrust_*` keys.
Expand Down
2 changes: 1 addition & 1 deletion templates/trust-center.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
?>
<?php if (!empty($ot_settings['show_powered_by'])): ?>
&nbsp;·&nbsp;
<a href="https://plugins.ettic.nl/open-trust-center-by-ettic" target="_blank" rel="noopener">
<a href="https://plugins.ettic.nl/opentrust" target="_blank" rel="noopener">
<?php esc_html_e('Powered by Open Trust Center', 'open-trust-center-by-ettic'); ?>
</a>
<?php endif; ?>
Expand Down
10 changes: 5 additions & 5 deletions uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
// here. The list below MUST stay in sync with that constant; if a CPT is
// added or renamed there, mirror the change here.
$ot_post_types = [
'eotc_policy',
'eotc_subprocessor',
'eotc_certification',
'eotc_data_practice',
'eotc_faq',
'ettotc_policy',
'ettotc_subprocessor',
'ettotc_certification',
'ettotc_data_practice',
'ettotc_faq',
Comment on lines +24 to +28
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Include legacy eotc_* CPTs in uninstall cleanup.

Right now only ettotc_* post types are deleted. If legacy eotc_* posts still exist, uninstall will leave plugin content behind. Please include both namespaces in $ot_post_types (or a fallback second list) to guarantee full data removal.

💡 Suggested patch
 $ot_post_types = [
+    // Current CPT slugs.
     'ettotc_policy',
     'ettotc_subprocessor',
     'ettotc_certification',
     'ettotc_data_practice',
     'ettotc_faq',
+    // Legacy CPT slugs from early builds (cleanup on uninstall).
+    'eotc_policy',
+    'eotc_subprocessor',
+    'eotc_certification',
+    'eotc_data_practice',
+    'eotc_faq',
 ];
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@uninstall.php` around lines 24 - 28, The uninstall cleanup only targets post
types with the 'ettotc_' prefix (the array listing 'ettotc_policy',
'ettotc_subprocessor', 'ettotc_certification', 'ettotc_data_practice',
'ettotc_faq'), leaving legacy 'eotc_*' posts behind; update the uninstall logic
to include legacy post types as well by adding the equivalent 'eotc_policy',
'eotc_subprocessor', 'eotc_certification', 'eotc_data_practice', 'eotc_faq'
entries to the $ot_post_types array (or create a second legacy array and merge
it before deletion) so functions like the post deletion loop remove both
namespaces.

];

foreach ($ot_post_types as $ot_post_type) {
Expand Down
8 changes: 4 additions & 4 deletions wpml-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
-->

<custom-types>
<custom-type translate="1">eotc_policy</custom-type>
<custom-type translate="1">eotc_certification</custom-type>
<custom-type translate="1">eotc_subprocessor</custom-type>
<custom-type translate="1">eotc_data_practice</custom-type>
<custom-type translate="1">ettotc_policy</custom-type>
<custom-type translate="1">ettotc_certification</custom-type>
<custom-type translate="1">ettotc_subprocessor</custom-type>
<custom-type translate="1">ettotc_data_practice</custom-type>
</custom-types>

<custom-fields>
Expand Down
Loading