=== PressConduit ===
Contributors: pcdesigns
Tags: mcp, ai, divi, bricks, wordpress, claude, chatgpt
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 0.29.16
License: GPLv2 or later

The conduit between AI assistants and your WordPress site.

== Description ==

PressConduit connects MCP-compatible AI assistants to a WordPress site that
uses Divi or Bricks Builder. It includes relay pairing, bearer-token auth, tool
registry, audit log, snapshots, live reload, updates, WordPress tools, media
tools, file tools, admin tools, and WooCommerce tools.

PressConduit detects the active builder and exposes only that builder's tool
surface:

* Divi sites get the Divi-native tool surface from Divi Conduit.
* `bricks_status` — detect Bricks and report available Bricks capabilities.
* `bricks_docs` — curated Bricks Builder documentation with optional relay
  read mode for allowlisted Bricks docs URLs.

Future builder-native write tools should stay builder-specific and should use the
official builder documentation before mutating builder data.

== Not affiliated with Divi or Bricks ==

Divi and Bricks are trademarks of their respective owners. PressConduit is an
independent product by PC Designs.

== Changelog ==

= 0.29.16 - August 30, 2026 =
* Added WP Grid Builder tools: wpgb_status, wpgb_object_list/get/save/duplicate/delete (covers grids, cards, facets, and styles — WPGB's four custom-table object types), and wpgb_shortcode. Calls WPGB's own Database + Settings classes directly, same code its admin REST routes use, so writes go through its own sanitizer.

= 0.29.15 - August 26, 2026 =
* Elementor: added global-classes (list/create/edit/delete/apply), global-variables (list/create/edit/delete), and a style-schema discovery tool for the Atomic Widgets design-token layer. Added dynamic-tags (list/get/apply — binds a widget setting to live post/ACF/author/URL data) and interactions (read/add/delete scroll/hover/load animations on atomic widgets).
* Bricks: added bricks_variables_write (create/update/delete global CSS variables) — pairs with the existing bricks_globals_read.
* Added Kadence tools: kadence_status, kadence_blocks_catalog/schema (reads live from the WordPress block registry), kadence_settings_read/write (theme Customizer settings, verified against a live install's theme_mods storage).
* Added Rank Math SEO tools: rank_math_status, rank_math_post_seo_read/write, rank_math_term_seo_read/write (focus keywords, title/description, canonical, robots, social previews, primary category) — verified against a live post's postmeta before shipping.
* divi_module_catalog now merges in a live read of the WordPress block registry for third-party Divi 5 module plugins (e.g. Divi Supreme Pro's dsm/* modules) that aren't in the bundled Divi-core catalog, so they're discoverable without dedicated per-plugin code. divi_module_schema already read the live registry as its primary source, so third-party module schemas were already reachable by name — this closes the discovery gap.

= 0.29.14 - August 21, 2026 =
* Removed the Tools tab from the plugin's admin screen. It printed a plain-English table of every registered tool's name and description — a free recon list for anyone who could log into wp-admin, no source access needed. Connected AI clients still discover tools normally through the MCP connector; this only removes the redundant human-readable copy that sat in the admin UI.
* Added WooCommerce order notes and coupon management: woo_order_add_note, woo_coupon_list, woo_coupon_get, woo_coupon_update, woo_coupon_delete. Continues the broader push toward full WooCommerce coverage started in 0.29.13.

= 0.29.13 - August 19, 2026 =
* Added full WooCommerce shipping zone/method management: woo_shipping_zone_list/create/update/delete and woo_shipping_method_add/update/delete. First slice of a broader push toward full WooCommerce coverage.
* Added divi_html_conversion_guide and bricks_html_conversion_guide — step-by-step routines (mirroring divi_migration_guide) for converting a raw HTML mockup into NATIVE Divi modules or Bricks elements instead of dumping it into a Code module/element.
* Elementor: detect and report the data model (classic vs. Atomic Widgets) on read and write, warn on mixed-shape trees or Atomic elements written while the e_atomic_elements experiment is inactive, and clear Elementor's stale whole-document render cache (_elementor_element_cache) on every page_write so raw postmeta writes can't leave the live front-end showing old content.
* wp_post_create now auto-flags a new page/post as owned by the site's active builder (Bricks/Divi/Elementor) when the caller doesn't already pass that meta, so it doesn't sit invisible to its own builder waiting on a follow-up call that might get skipped.

= 0.28.0 - August 2, 2026 =
* The specimen library now fetches from the PC Designs relay first (12h cache), falling back to the copies bundled in the plugin if the relay is unreachable — new or fixed specimens can ship without a plugin update. Fetch status is recorded in the pcd_pc_specimens_status option.
* Added 4 more Divi 5 specimens: text-masking, golden-ratio-hero, photo-background-hero, and tabs.

= 0.27.1 - August 2, 2026 =
* Added the email-popup specimen (Divi 5): a centered-modal email-capture popup with a working close interaction, dark overlay backdrop, and email form — built on Divi 5's Interactions system (module.decoration.interactionTarget/interactionTrigger/interactions), which is now confirmed settable via the same REST attribute editing every other specimen in this library uses.

= 0.27.0 - August 1, 2026 =
* Divi component library expanded: post-grid, header (with a Link/Dropdown submenu), footer, split-feature, and email-signup specimens, each shipped as a matched Divi 5 / Divi 4 pair (10 files total) so the AI can pull real, verified markup for these patterns on either engine.
* Updated the Divi 5 mastery notes and capture spec with the build findings behind those specimens: the full-bleed image sizing recipe (decoration.sizing, not advanced.sizing), the dropdown-content color-token fix needed for reliable rendering, a confirmed divi_capture tooling bug with Dropdown-nested children, and why the native Email Optin modules were skipped in favor of a plain contact-form for the signup specimen.

= 0.26.0 - August 1, 2026 =
* New security tooling, built out of a real incident: wp_file_delete (actual delete, not overwrite-with-stub), wp_file_scan_malware (severity-tagged backdoor/webshell pattern scan across themes, plugins, mu-plugins, uploads, and loose wp-content-root files, with plugin-impersonation detection and per-match file-owner/modified-time origin clues), wp_scan_db_malware (same patterns against wp_options values), wp_scan_cron_jobs (flags WP-Cron persistence hooks not tied to core or an active plugin), wp_security_triage (runs all of the above plus an admin-account list in one call), and wp_wordfence_login_log (opportunistic read of Wordfence's own login log, degrades gracefully if absent). Read access widened to wp-content/uploads for investigation. Security tooling now lives in its own file (class-pcd-pc-tools-security.php) to keep the WordPress tools file from growing indefinitely.

= 0.25.3 - July 11, 2026 =
* wp_post_create and wp_post_update now accept post_parent and menu_order, so the AI can build hierarchical content (Divi Docs Maker doc trees, child pages, and other hierarchical CPTs) and control sibling ordering. Updates snapshot the prior parent and order for undo.

= 0.25.2 - July 11, 2026 =
* Fixed: sites with no detected page builder (a block theme, a plain WordPress install, or a Bricks site before the theme is activated) registered zero tools, because the whole tool surface was gated behind Bricks/Divi detection. The generic WordPress, media, file, and admin tools now register on any site; only the Bricks and Divi tool sets stay gated behind their builder.

= 0.25.1 - July 11, 2026 =
* Fixed: on Bricks sites the plugin could register zero tools (empty Tools tab, and only the relay's 2 built-in tools in the AI client). Tool registration ran on plugins_loaded, before the Bricks theme and its post types finish loading, so builder detection failed and every tool was gated out. Registration now runs on init, where Bricks and Divi are reliably detected.
* Connection: added a note that the AI connector must be added from the same browser where the WordPress admin is open, since the connection is authorized through that browser's session. Adding it from a different browser fails with "No Conduit session in this browser."

= 0.25.0 - July 9, 2026 =
* New: automatic updates. PressConduit can now install its own updates in the background, so the plugin stays current with the relay without a manual click. Toggle it on the Settings tab (on by default). Updates that would require a newer WordPress or PHP version are never installed automatically.
* Changed: the update flow now tells WordPress the minimum WordPress version each release needs, so an incompatible build is held back instead of offered.
* Changed: the PressConduit admin now wears the PC Designs brand. Navy header with the gold PressConduit mark and a live version badge (was a static "MCP" chip), tabs that flow into a lighter workspace, and gold primary buttons. Only this plugin's pages are styled. The rest of your WordPress admin is untouched.

= 0.24.7 - July 1, 2026 =
* Security: the WordPress options tools now refuse to read or write any option whose name looks like a secret or credential (tokens, passwords, API keys, salts).
* Fixed the plugin author link in the plugin header.
* Snapshot-backed undo now covers page, layout, option, and post-meta changes, so any AI edit can be reversed.
* Divi 5: setting global colors through the plugin writes the native Divi 5 global-color store, so brand-color references (var(--gcid-...)) resolve correctly.
* Completed the Divi 5 specimen library (hero, feature grid, CTA, stats, testimonials, pricing, FAQ, and contact) that the AI copies and adapts instead of building common sections from scratch.

= 0.23.1 =
* The Divi 5 specimen library now ships the full v1 set of eight verified section recipes: hero, feature-grid, final-cta, stats-band, testimonials, pricing, faq (accordion parent/child), and contact (contact-form parent/child). 0.23.0 shipped only hero and feature-grid.
* Every specimen's color references now carry an inline fallback (e.g. `var(--gcid-pcd-surface-dark, #26292F)`), so a section renders correctly even on a site whose brand palette has not been set up yet; the site's global colors still win when present.
* `divi_capture` portability lint adds an `empty-module` warning: a content module that round-trips with no configured attributes (a sign the editor emptied or dropped it on save) is now flagged instead of passing silently.
* The contact specimen documents its deployment requirements (insert via a raw post write rather than the page-creation controller, then clear the Divi static CSS cache) so its form fields are not stripped on insertion.

= 0.23.0 =
* New: built-in Divi 5 specimen library — verified, portable section recipes the AI copies and adapts instead of composing common sections from scratch. Surfaced via `divi_specimen_list` and `divi_specimen_get`; ships with `hero` and `feature-grid` to start. Each specimen carries its required color tokens, placeholder markers, and annotations describing which attributes are brand-variable vs structural.
* New: `divi_module_example` now points the AI at a matching library specimen when a site has no rich example of a requested module, instead of only asking the user to build one in the Visual Builder.
* New: capture tooling — `divi_layout_outline` maps a page's block tree; `divi_capture` slices out a section/row/group/module as portable block markup and runs a portability lint (theme-CSS classes, inline styles, hard-coded colors vs design-variable/global-color references, site-local presets, site-hosted media URLs, code-module escape hatches).
* New: `divi_variables_get` / `divi_variables_set` read and write Divi 5 Design Variables (numbers, strings, images, links, fonts, gradients) via the native GlobalData layer.
* Fixed: `divi_global_colors_set` now writes the Divi 5 global-color store (et_global_data) through GlobalData on D5 sites, so `var(--gcid-…)` references resolve. It previously wrote only the legacy Divi 4 option, which Divi 5 ignores.

= 0.22.6 =
* Fixed the AI self-update tools (`pcd_pc_check_update` / `pcd_pc_self_update`) checking the wrong product manifest. They omitted the product identifier, so the backend answered with the frozen divi-conduit release and the tools reported "already on the latest version" no matter how far behind the site was. The wp-admin update path was unaffected.

= 0.22.5 =
* Divi tool exposure is now strictly generation-specific. Divi 4 sites expose only the shortcode tool surface; Divi 5 sites expose only the native block, catalog, docs, outline, and capture surface.
* The active parent theme version is authoritative for Divi generation detection.
* Cross-generation module requests and layout content are rejected instead of converted or written through the other generation.
* Divi 5 operations no longer fall back to Divi 4 storage when the native Divi 5 controller is unavailable.

= 0.22.4 =
* Added an "Allow file management" opt-in (Settings tab, default off). Lets the AI file tools work on sites where `DISALLOW_FILE_EDIT` is set in wp-config.php — which otherwise strips the `edit_themes` capability from everyone and silently blocks file tools. When enabled, file tools run as the linked administrator; writes stay confined to themes/plugins/mu-plugins and PHP edits are still syntax-checked. Blocked file tools now return a clear message naming the cause (DISALLOW_FILE_EDIT) and how to enable access, instead of a bare "Missing capability".

= 0.22.3 =
* Divi 5 tools now recognize third-party/custom modules, not just core `divi/` blocks. The module catalog, schema, build, and block-format detection match any block registered under a Divi module category (module, structure, fullwidth-module, child-module) and treat vendor-namespaced names (e.g. `pcd/…`, `pac/…`) as real Divi 5 modules. Bare names still get the `divi/` namespace; already-namespaced names are used as registered.

= 0.22.2 =
* Fixed: pages created/written on Divi 5 sites now have the Divi Builder enabled automatically. Previously the Divi 5 `set_post_layout` path stored the layout but left the builder toggle off, so the page showed "Use The Divi Builder" and the Visual Builder opened empty. Builder-enable (`_et_pb_use_builder` + `_et_pb_built_for_post_type` + Divi's own enable routine) is now applied on every create/layout/enable path via a single shared helper.

= 0.22.1 =
* Fixed: the "My Plugins" menu no longer lists retired Divi Conduit / Bricks Conduit as permanent "(Not installed)" entries. PressConduit now registers only itself in the shared PC Designs menu; sibling products appear only when actually installed.

= 0.22.0 =
* wp_site_info now reports the active page builder (`builder`: divi | bricks | none) and its version, so connected AI clients know up front which builder a site runs and which tools/docs apply.

= 0.21.0 =
* Bricks: added the element schema + build tool surface — bricks_element_catalog and bricks_schema (read live from the Bricks element registry), bricks_page_read and bricks_page_write (read/write the element array in postmeta with id/parent/children normalization, snapshot-backed undo, and editor-mode handling), bricks_template_list, bricks_template_create, and bricks_globals_read (theme styles, global classes, components, variables, color palette, breakpoints).
* Bricks docs catalog rebuilt against validated Academy URLs with relay read mode.

= 0.20.5 =
* Initial PressConduit scaffold.
* Combined the Divi and Bricks Conduit tool surfaces under one plugin identity.
* PressConduit detects the active builder and only exposes Divi or Bricks tools.
