| 开发者 | lucaslopvet |
|---|---|
| 更新时间 | 2026年10月22日 20:59 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
html_to_divi tool turns it into a Divi 5 layout and reports anything it left out.
How it works (in plain words)
list_divi_pages: list the pages built with Divi 5 that you can edit (pass post_type project to list Divi Projects).get_page_layout: read the current layout of a page or Divi Project. For a big page your assistant can read just an outline (every block with its place, size and the start of its text) or one block, which costs a fraction of reading the whole page.list_global_styles: list your site's own Divi colors and presets so the AI can reuse them (read-only).get_site_structure: list your site's custom post types, taxonomies, image sizes, Divi 5.15 components (name, kind, Slots, how many pages use each) and Advanced Custom Fields field groups so pages fit your site (read-only: field names and the keys your posts use, never values here or theme files; available over MCP and the REST API, not in the ChatGPT Action).get_custom_fields: read the custom fields of one page or Divi Project you can edit, with their values, so your assistant can write copy that fits and use the right field names (read-only: keys WordPress protects, or that look like passwords, API keys or other secrets, are never shown; available over MCP and the REST API, not in the ChatGPT Action).list_products: list and count your WooCommerce products with their prices, stock status and categories (read-only; needs the permission to edit products; available over MCP and the REST API, not in the ChatGPT Action).get_product: read one WooCommerce product in full, including its variations (read-only; never downloadable files, purchase notes or custom fields).validate_layout: check a layout without saving anything.edit_page_content: change one piece of text (an email, phone number, price or sentence) without rebuilding the page or Divi Project. Add dry_run to preview the change without saving it.update_page_layout: save a new layout for a page or Divi Project, after the checker approves it. Add dry_run to preview what would change without saving it.create_page: create a new page. It is always saved as a draft for you to review and publish.html_to_divi: turn HTML you already have (a page your assistant or another tool wrote) into a Divi 5 layout: the structure, all the copy, the links and the images, plus the basic colors, fonts and spacing where Divi can show them and the text stays readable. It previews by default and saves a new draft only when asked. Scripts, forms, embeds and site navigation are never converted and are listed in a report (available over MCP and the REST API, not in the ChatGPT Action).list_page_history, get_page_history_entry, restore_page_version: see the saved earlier versions of a page or Divi Project and bring one back.get_style_guide: how to build styled Divi 5 layouts, using real Divi 5 settings.get_landing_guide: how to build a landing page that turns visitors into customers.get_site_guide: how to plan a site with several pages that link to each other.get_section_recipes: the 71 ready-made section patterns.get_image_guide: how to pick the right image for each section, including the built-in image pack.list_media_images: look through the images already in your Media Library (read-only; nothing is uploaded, changed or deleted).jhmg-ai-editor-for-divi-5 folder to /wp-content/plugins/ and activate it on the Plugins screen.)No. The API key works as the WordPress user who created it, and the AI can only use this plugin's tools. Every request checks that this user can still edit pages, and every page listing, read or change, every new page and every Media Library lookup re-checks that user's WordPress permissions (pages they cannot edit are not even listed). The tools can only list, read, check, edit and undo the content of pages and Divi Projects, create pages (as drafts), read Media Library images (read-only), read your site's Divi presets and colors (read-only), read how your site is set up (post types, taxonomies, image sizes and ACF field definitions, read-only), read the custom fields of a page or Divi Project you can edit (read-only), and read your WooCommerce products (read-only). They cannot install plugins, change users, settings, menus or the front page, or run PHP or other server-side code.
No. The checker refuses any layout that contains custom CSS, a Divi Code module, script, style or iframe markup, a javascript: link or an event attribute, and the plugin has no tool that saves CSS, JavaScript or PHP or changes site settings. Anything already on a page, for example custom CSS you added in the Visual Builder, is kept: the AI cannot add or change code (it can only remove it).
From your own Media Library first. When nothing there fits, the AI uses the built-in image pack that ships inside the plugin. Nothing is downloaded from third-party websites.
No. The plugin does not send your data anywhere and uses no third-party services. Your AI assistant connects directly to your site with your key. The page content your assistant reads is handled by the AI service you chose (for example Anthropic or OpenAI), under that service's own terms.
The AI can make mistakes, but a broken page is never saved by an AI edit. The checker runs before every save. If a layout breaks a rule, it is refused, nothing is saved, and the AI gets the exact reason so it can fix it. If you do not like a change that was saved, restore the previous version from the Dashboard: undo puts back your own earlier version exactly as it was, and when your AI assistant does the restore it is told whether that version passes the checker.
The key is a long random code stored in your WordPress database and shown only to administrators on the plugin's Settings screen. Keep it private, like a password. You can make a new one at any time with the Regenerate button, which stops the old one from working.
Every save is checked by a fixed set of rules (no AI is involved in the check) and a broken layout is refused. You can ask your assistant for a preview first (a dry run shows what would change and saves nothing), new pages are always drafts, and every save can be undone from the Dashboard. The plugin cannot change your site settings, users or plugins, and cannot add custom code. If you want a stricter rule, turn on Approval mode in Settings ("Require a preview before every save"): your assistant must then preview every edit to a page's content before it can save it. Restoring an earlier version is the undo and needs no preview.
The plugin edits the Divi 5 layout data directly, so it is faster and more precise, every change is checked before it is saved, and every save can be undone. An assistant that drives a browser works from screenshots and clicks, and nothing stops it from saving a broken layout.
No. The check runs in PHP on your own server. Your assistant only reads what the plugin sends back: the tool list it loads once per conversation (about 4,000 tokens), reading the page it is editing (about 300 to 16,500 tokens depending on its size), and the details of what was wrong when a layout is refused (about 400 tokens for one unknown block). These are estimates; the real count depends on the model.
Yes. It has been tested with Gemini CLI: copy the one command from the Gemini tab on the Settings screen. Any assistant that supports remote MCP servers can connect.
Yes, for reading. Your assistant can list and count your products and read one product in full (name, description, price, stock, categories, variations), so it can answer store questions and write shop pages that match your catalogue. It never changes a product: prices and stock are not touched by this plugin.
It can read how your site is set up: custom post types, taxonomies, image sizes and, when Advanced Custom Fields is active, its field groups and fields (names, labels, types and choices). It reads custom field values only when your assistant asks about one specific page or Project you can edit, never ones WordPress protects or that look like passwords, API keys or other secrets, and it never reads your theme files or functions.php. This is available to assistants that connect over MCP or the REST API, not to the ChatGPT Action.
No. It reads the ones you already have, reuses them, and warns when a layout uses one your site does not have. It never creates, changes or deletes them.
Assistants that run on your own computer (Claude Code, Claude Desktop, Cursor, VS Code, Gemini CLI) should be able to reach a local site. Use the exact http:// address your local site shows, and turn on pretty permalinks. ChatGPT and other assistants that run in the cloud cannot reach a local site; they need a public https:// address. Local tools such as Laragon, Local or MAMP work with the assistants that run on your computer.
Claude Desktop connects through a small helper that needs Node.js. Install the LTS version from nodejs.org, then fully quit Claude Desktop (Cmd+Q) and open it again. The Claude tab on the Settings screen has the details.
Some hosts run a firewall rule (for example ModSecurity's "too many 404 responses from same IP") that bans an address after about ten "not found" answers. The plugin does not cause 404s on its own address: when an assistant opens the connection with a GET request, it answers 405 (Method Not Allowed), which is what the MCP specification asks for and which these rules do not count. Some connection helpers, such as the mcp-remote helper that Claude Desktop uses, also look for sign-in information at addresses like /.well-known/oauth-protected-resource. If Claude sign-in is switched off, there is nothing at those addresses, so WordPress answers 404, and several reconnects in a row can still add up. If you get banned, ask your host to allow your own IP address, or to raise the limit for it. Another option is a small connector that a user, Brandon McCloskey (Web Design by Brandon), has shared as a public GitHub Gist called "wp-mcp-bridge" (MIT licence, needs Node.js 18 or newer). It only sends requests to the connection address, so it never causes 404s. It is not made or checked by us, and it handles your API key, so read any script like this before you use it.
The plugin has no AI of its own, so it adds no AI cost. Your own assistant does the thinking, and its usage counts against whatever plan or API account you already use with it. A small edit costs very little; building a whole page costs more, because your assistant writes the layout. The plugin's checking runs on your server and is free.
Divi AI is Elegant Themes' own AI inside the Divi builder. This plugin does something different: it lets the AI assistant you already use (Claude, ChatGPT, Gemini, Cursor, Copilot) read and edit your Divi 5 pages from outside the builder, in plain English. Every change is checked before it is saved and can be undone.
It is built for one job: editing Divi 5 layouts safely on a live site. It knows the Divi 5 page format, refuses any layout that is broken before it is saved, offers a preview of every change, makes new pages drafts, and keeps an undo history. It does not run code on your site and does not change your site settings.
Yes. The plugin adds a Model Context Protocol (MCP) server to your own WordPress site, with 21 tools made for Divi 5 pages and Divi Projects. Any MCP client can use it: Claude, Cursor, Windsurf, VS Code with GitHub Copilot, Gemini CLI and others. ChatGPT connects through a custom GPT Action that offers most of the same tools.
Yes, through your AI assistant. Give the assistant a screenshot or the address of a page and ask it to build that page in Divi 5. It uses this plugin's guides and section patterns, writes a layout, and the checker tests it before it is saved as a draft. The plugin itself does not look at images or fetch websites, and photos are never copied, so expect a close match to the design with your own images and text swapped in.
Yes. On the Settings screen, turn on sign-in for Claude and copy the address it shows. In claude.ai open Customize → Connectors, choose "Add custom connector" and paste the address. Claude opens your own site: you sign in to WordPress and press Allow. There is no Node.js, no config file and no API key to paste. Claude then works as you, with exactly the permissions your account has, and every save is still checked and undoable. You can disconnect it from the Settings screen at any time. It needs your site to be reachable over public https (Claude connects from the internet), so it does not work on a local site; the other ways of connecting are unchanged. It is off until you turn it on.
Yes, for the content. Give your assistant the HTML (for example a page it wrote for you) and it can convert it with html_to_divi: the structure (sections, columns for card grids, headings, text, buttons, images), every word and every link. It previews first and tells you what was not converted; with one more step it saves a draft. Scripts, forms, embedded videos, site navigation and CSS code are never converted; it carries the basic colors, fonts and spacing of the HTML where Divi can show them, and never a color that would make text hard to read; linked stylesheets are not fetched, so a page that keeps its styling in an external file comes out plainer; and images become placeholders for you to replace with your own. It does not fetch web addresses. For a pixel-accurate copy of a live web page you need a dedicated URL-to-Divi converter instead.
Yes. Ask your assistant to rename the page and it uses the update_page_layout tool with a new title (the page can be a Divi page or a Divi Project). This changes the WordPress page title: what shows in the page list and, by default, the browser tab. It is not the same as the big headline (the h1) inside the page layout, which is part of the layout and is changed separately; if the two match, your assistant should ask whether you want both changed. It changes only the title: not the page address (slug). A title change is not covered by Undo, so your assistant tells you the old title when it changes one, and a title change is not listed under "Recent AI edits" on the dashboard, because that list shows saved versions you can restore and a title change has none. You can ask for a preview first.
No. Divi 4 stores pages as shortcodes. This plugin is made for the Divi 5 page format.
Not yet. The checker only knows Divi's own modules, so it refuses to save a page that contains a module from another plugin (for example Divi Pixel or Divi Plus), even for a text change. Your assistant can still read such a page, and it can edit every other page. Nothing is changed on a refused save, and the reply tells your assistant exactly which block was not recognised.
It works on any standard WordPress site, including staging sites. Multisite is not officially supported yet.
No. The plugin adds no scripts or styles to your public pages. It only adds its admin screen and the connection endpoints your AI assistant uses.
html_to_divi now carries the HTML's basic colors, fonts, sizes, alignment, backgrounds and spacing (and a button's colors and corners) where Divi can show them, and drops any color that would make text hard to read. The report lists what was carried and what was left out.html_to_divi could lose content or structure in a few HTML shapes: HTML5 sections placed after a stylesheet link, <meta> or <style> (the page was refused as empty or the first section was dropped), content after the closing </html> tag, a section following loose text at the start of a fragment, a section following loose text after the closing </body> tag, a section, header, footer or other block right after a paragraph that was never closed, and a script whose code contains </body>, </html> or another closing tag (its code showed up as page text). In the last four a heading could turn into bold text. The word and link checks now see all of it.get_section_recipes).get_section_recipes takes a style_kit; each kit has its own guide topic). Every combination was checked for readable text on the real Divi 5.15.1.advisories). It never blocks a save.get_site_structure (name, kind, Slot ids, how many pages use each; never their content) and is told when a change inside a component would not show, because Divi displays the component's own content on every page that uses it.get_page_layout with view). On the real pages used for testing an outline is about a sixth of the size of the full layout.calc(10px) is now refused. Divi writes it into the page's stylesheet as it is, and on Divi 5.15.1 it made every section lose its custom styling.html_to_divi turns HTML you already have into a Divi 5 page: the structure, every word, every link and the images. It previews first and tells you what it could not convert (scripts, forms, embeds, site navigation and CSS are never converted); with one more step it saves a draft. Colors and fonts are not converted yet.html_to_divi).list_products lists and counts them with their prices, stock status and categories, and get_product reads one product in full, including its variations. Both are read-only: they never show downloadable files, purchase notes, customer or order data, or the text of a password-protected product, and they need the permission to edit products (shop managers and administrators have it). Available over MCP and the REST API, not in the ChatGPT Action.get_site_structure now also says how many items each content type has, so your assistant can answer "how many products (or pages, or posts) do I have?".list_divi_pages takes an optional post_type (page or project) to list them. New pages are still always drafts, and posts and other content types are still refused.get_custom_fields lets your assistant read the custom fields of one page or Divi Project you can edit, with their values, so the copy it writes fits and it uses the right field names. It is read-only. Keys WordPress keeps private, and fields that look like passwords or tokens, are never shown, and long values are cut. Available over MCP and the REST API, not in the ChatGPT Action.get_site_structure now also lists the custom field names your posts use (names only, never values), and the style guide explains how to show a custom field in a module.list_global_styles points it there.get_site_structure now also says where each field group applies (for example "post_type == page"), so your assistant only uses fields that exist on the page it is editing.get_site_structure: custom post types, taxonomies, image sizes and, when Advanced Custom Fields is active, its field groups and fields (names, labels, types and choices; never field values). Read-only.npx), Gemini CLI has its own tab, and there is a note on which assistants can reach a local site. The Features screen says that your global colors, variables and presets are read-only.ping) now answers exactly as the MCP specification asks, which strict clients require.list_global_styles, lists them.update_page_layout and edit_page_content accept dry_run: they return the checker's verdict and a short list of the blocks and settings that would change, and save nothing.jhmg-ai-editor-for-divi-5).create_page is part of this plugin: create new pages, always saved as drafts.list_media_images lets your AI reuse the images already in your Media Library (read-only).list_page_history, get_page_history_entry, restore_page_version) is part of this plugin.edit_page_content).