=== Decomp Concept Graph ===
Contributors: decompacademy, freemius
Tags: graph, knowledge-base, gutenberg, polylang, wpml
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.9
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.
* Tabbed admin panel (Welcome, Hub, Metrics, Sync/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 > Sync / Examples and click "Fill with sample data".
4. In Decomp Concept Graph > Settings > Hub, 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.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.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.
