=== Decomp Concept Graph ===
Contributors: decompacademy
Tags: graph, knowledge-base, gutenberg, polylang, wpml
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn your posts into an interactive D3.js concept graph with categories, levels and relationships. Compatible with Polylang and WPML.

== Description ==

Decomp Concept Graph builds an interactive, graph-based knowledge portal from your WordPress content:

* A dedicated "Hub Entries" content type with hierarchical categories, proficiency levels and bidirectional relationships.
* A D3.js graph viewer with global search, a category menu and article feeds (Latest and Featured).
* Article widgets: breadcrumbs, table of contents, related articles and a floating graph window centered on the current node.
* Multilingual: automatic integration with Polylang and WPML (the graph and texts follow the active language); monolingual when neither is active.
* The plugin's own interface is translated into 17 languages: English, Spanish, German, French, Italian, Brazilian Portuguese, Japanese, Russian, Indonesian, Turkish, Polish, Vietnamese, Thai, Ukrainian, Romanian, Greek, and Chinese (Simplified and Traditional).
* Tabbed admin panel (Welcome, Dashboard, Metrics, Export & Examples, Support) with one-click sample data and Markdown export.

= Gutenberg blocks =
* Hub Dashboard — the full portal: search, category menu, the interactive graph and the Latest/Featured feeds.
* Hub Entries — the per-entry widgets: breadcrumbs, table of contents, related entries and a focused graph.

= Shortcodes =
* [dcgraph_portal_dashboard] - full Dashboard.
* [dcgraph_article_widgets] - article widgets.

== Installation ==

1. Upload the `decomp-concept-graph` folder to `/wp-content/plugins/` (or install the ZIP from Plugins > Add New).
2. Activate the plugin from the Plugins menu.
3. (Optional) Go to Decomp Concept Graph > Settings > Export & Examples and click "Fill with sample data".
4. In Decomp Concept Graph > Settings > Dashboard, create or assign the Dashboard page.
5. Insert the "Hub Dashboard" block (or the [dcgraph_portal_dashboard] shortcode) on that page, and the "Hub Entries" block in your posts.

== Frequently Asked Questions ==

= Do I need Polylang or WPML? =
They are optional. With Polylang or WPML installed, multilingual support is automatic - the graph and texts follow the active language; without them the plugin runs in monolingual mode. Do not use both at the same time.

= How do I connect two entries? =
In an entry's editor, check the related entries in the relationships metabox; the link is created bidirectionally.

= Does it load D3.js from a CDN? =
No. D3.js (BSD-3-Clause, GPL-compatible) is bundled locally - both the minified runtime (assets/js/d3.v7.min.js) and the full, unminified source (assets/js/d3.v7.js) ship inside the plugin. Nothing is loaded from a CDN. The library's home is https://github.com/d3/d3.

= Is there a paid version? =
A separate, optional premium add-on with extra features is available from the author at https://decomp.finance/en/decomp-concept-graph/. It is not required - this plugin is fully functional on its own.

== Screenshots ==

1. The Hub Dashboard: global search, category navigator, the interactive D3 concept graph, and Latest/Featured article feeds.
2. A single entry with its article widgets — breadcrumbs, table of contents, related entries and a floating concept graph.
3. The interactive knowledge graph: labelled nodes, relationship links, Reset View and zoom controls.
4. The admin settings: assign the Dashboard page and run maintenance.

== Changelog ==

= 1.1.1 =
* The plugin interface is now available in 16 more languages: German, French, Italian, Brazilian Portuguese, Japanese, Russian, Indonesian, Turkish, Polish, Vietnamese, Thai, Ukrainian, Romanian, Greek, and Chinese (Simplified and Traditional).
* Fix: on WordPress 6.2 to 6.7 the bundled translations were never loaded, so every language fell back to English. The plugin now registers its own translation folder explicitly. If you run WordPress 6.8 or newer you were not affected.
* Fix: the Welcome tab named the other four tabs in English on every translated site, so a Spanish admin was pointed at tabs called "Metrics" and "Support" that their own screen called "Metricas" and "Soporte". The names now come from the tab bar itself.
* Fix: dates are now formatted for the reader's language. Japanese and Chinese show 2026-09-10 in their own order, Thai uses the Buddhist year, and German and Russian keep the abbreviation dot that was previously stripped.
* Fix: the PRO graph viewer showed month names in Spanish in every language, English included.
* Fix: "Relationships resolved for %d nodes." now has a singular form, so importing one node no longer reads "1 nodes".
* Fix: anything the plugin SAVES now follows the site's language, not the language of whoever happened to be logged in. This affected the three difficulty levels and the page created by "Create the Dashboard page": both took the language of whichever administrator triggered them, and because they are saved to the database they stayed that way - a German site whose administrator works in Japanese ended up with Japanese level names and a Japanese page title that every visitor could see. If your levels or that page are in the wrong language, rename them once in Hub Entries > Levels and in Pages.
* Fix (Greek): the "Expert" level read "Ειδικά", which means "especially" rather than an expertise level.
* Fix (PRO): a custom date format of "dd mmm yyyy" typed into a block's settings was ignored and the reader's own locale format used instead. Any format you type is now used exactly as written; leave the field empty to get the format of the reader's language.
* Twenty further pieces of interface text that no translation could reach are now translatable, including the Markdown import template and several graph and vault labels.
* Layout hardening for the new languages: text that could silently overflow or be clipped now wraps, and Thai and Vietnamese get the extra line height their scripts need. Nothing changes at English on a desktop screen except eight slightly taller text blocks.

= 1.1.0 =
* Mobile: on touch devices the floating concept-graph window is no longer a fixed bar over the article. It now sits in the page, collapsed to its header, and expands in place. On a phone it was covering up to 79% of the screen width with no way to move or dismiss it.
* Spanish translation completed: the admin screens and the front-end strings (search, breadcrumbs, empty states) are fully translated. Nine front-end strings had never been translated at all.
* The "Sync / Examples" settings tab is now "Export & Examples" - nothing on it performed a sync. Existing links to the tab keep working.
* Fix: uninstalling the plugin now also removes the category-order option WordPress creates for the entry categories.

= 1.0.9 =
* Fix: the "Upgrade" (Plans and Pricing) screen rendered blank. The bundled Freemius SDK is updated from 2.13.2 to 2.13.4, whose pricing app correctly selects the product's currency.
* Tested up to WordPress 7.1.

= 1.0.8 =
* Maintenance: version alignment with the premium add-on. No functional change to the free plugin.

= 1.0.7 =
* Security: integer request parameters now use absint() for clearer, tool-recognized sanitization.

= 1.0.6 =
* Packaging: the full unminified D3.js source now ships alongside the minified runtime, and development-only files are excluded from the distributed package.
* Security: additional unslashing/sanitization hardening on admin form inputs.

= 1.0.5 =
* WordPress.org compliance: the free build now contains no premium or locked-feature code. Multiple Hubs, My Vault, the individual blocks (Search/Selector/Graph/Viewer), Markdown import and the custom color/styling controls are no longer part of the free package - they ship only in a separate premium build (the free build keeps a fixed default look). The free plugin is a fully-functional single knowledge base.
* Security: hardened input sanitization, validation and escaping across the plugin (relationship saving, search, ZIP/export handling, settings inputs).

= 1.0.4 =
* WordPress.org compliance: the free build contains only the free feature set; feature availability is decided solely by code presence (no license-based gating).
* The free admin Help/Support tab documents only the features included in the free build.
* Security: the public graph endpoint and the embedded front-end graph data only ever include published content. Translated entries and linked relationships are verified as published before they are exposed, so no draft or private content can leak.

= 1.0.1 =
* Security: entry titles and descriptions are sanitized before they are drawn in the graph, cards and search; the Viewer card template is escaped.
* Multilingual: graph relationships now sync correctly when an entry is edited in a secondary language; the dashboard respects the active site language.
* Fixes: a duplicate category box in the editor, "nodes without links" detection, and a script clash when a Dashboard and an Article block share the same page.

= 1.0.0 =
* Initial release: entries CPT, category and level taxonomies, bidirectional relationships, local D3 graph, multilingual (Polylang/WPML), Hub Dashboard and Hub Entries blocks, shortcodes, tabbed admin panel and Markdown export.

== External Services ==

This plugin integrates the Freemius SDK (a third-party plugin licensing and analytics service) to provide optional, opt-in usage diagnostics, to manage your account and license for the separate premium add-on, and to display its pricing/checkout when you choose to open it. The plugin is fully functional without contacting this service; no personal data is sent unless you opt in or actively use the account/checkout flows.

- Service: Freemius (https://freemius.com).
- Endpoints contacted: api.freemius.com, wp.freemius.com and checkout.freemius.com.
- When it is contacted: (a) only if you grant opt-in consent, for anonymous environment diagnostics; (b) when you connect an account or activate/validate a license for the premium add-on; (c) when you open the pricing or checkout screen.
- Data sent in those cases: your site URL and domain, the plugin and WordPress/PHP versions, and - only if you opt in or sign in - your administrator email and basic environment details; plus the license key when you activate a license.
- Terms of Use: https://freemius.com/terms/  -  Privacy Policy: https://freemius.com/privacy/

The D3.js library (BSD-3-Clause, GPL-compatible) is bundled locally; it is not loaded from any external CDN.

== Upgrade Notice ==

= 1.1.1 =
Sixteen new interface languages, and a fix for bundled translations never loading on WordPress 6.2 to 6.7.

= 1.1.0 =
Mobile fix for the floating graph window, complete Spanish translation, and a clearer name for the Export tab.

= 1.0.9 =
Fixes the blank Upgrade / Plans and Pricing screen (Freemius SDK 2.13.4).

= 1.0.8 =
Maintenance release.

= 1.0.7 =
Minor input-sanitization refinement.

= 1.0.6 =
Packaging and input-sanitization hardening.

= 1.0.5 =
WordPress.org compliance: all premium/locked-feature code removed from the free build; security hardening throughout.

= 1.0.4 =
WordPress.org compliance: the free build ships only the free feature set, and the public graph never exposes unpublished content.

= 1.0.1 =
Security, multilingual and editor fixes.

= 1.0.0 =
Initial release.
