=== Draft2Live Connect === Contributors: draft2live Tags: ai, content-generation, publishing, polylang, multilingual Requires at least: 6.0 Tested up to: 6.9 Requires PHP: 7.4 Stable tag: 1.2.7 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Publish AI-generated articles from Draft2Live to WordPress in one click, with two-way sync and multilingual support (Polylang, WPML). == Description == **Draft2Live Connect** is the official bridge between your WordPress site and [Draft2Live](https://draft2live.ai), an AI content generation platform that helps you research, plan, write and publish long-form SEO articles at scale. Once the plugin is installed and your site is paired with your Draft2Live account, you can: * Publish articles generated in Draft2Live straight to WordPress without leaving the dashboard * Keep content in sync both ways — edits made in WordPress flow back to Draft2Live automatically * Assign categories, tags, featured images and authors at publish time * Schedule publications for a future date (handled by Draft2Live's unified scheduler, so it works exactly the same for WordPress and Drupal) * Publish multilingual content and link translations automatically if your site uses [Polylang](https://wordpress.org/plugins/polylang/) or [WPML](https://wpml.org/) * Write SEO meta title / meta description / focus keyword through [Yoast SEO](https://wordpress.org/plugins/wordpress-seo/) or [Rank Math](https://wordpress.org/plugins/seo-by-rank-math/) when one of them is active **One-click secure pairing.** No copy-pasting site IDs or secrets. The plugin uses WordPress's native [Application Passwords](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/) flow — click **Connect to Draft2Live** in the plugin settings, approve the Application Password in the standard WordPress prompt, and the pairing completes automatically. **You stay in control.** Draft2Live never receives your WordPress login password. You can revoke access at any time by deleting the Application Password under **Users → Profile → Application Passwords**, or by deactivating the plugin. **Open source.** The plugin source is available on our [website](https://draft2live.ai) under the GPL v2 license. == Installation == 1. From your WordPress admin, go to **Plugins → Add New**, search for "Draft2Live Connect" and click **Install Now**, then **Activate**. (Or upload the `draft2live-connect` folder to `/wp-content/plugins/` manually.) 2. Go to **Settings → Draft2Live**. 3. Click **Connect to Draft2Live**. You'll be redirected to the standard WordPress Application Password approval screen — review it and click **Yes, I approve**. 4. That's it. The site is now paired. You can start publishing from your Draft2Live dashboard. If you don't have a Draft2Live account yet, you can sign up for free at [draft2live.ai](https://draft2live.ai). == Frequently Asked Questions == = Is the plugin free? = Yes. The plugin is 100% free and open source under the GPL v2 license. A Draft2Live account is required to generate content, and Draft2Live itself offers a free tier so you can try the full workflow end-to-end at no cost. = What data does the plugin send to Draft2Live? = Only the data needed to keep your articles in sync: * When you publish from Draft2Live, the article content (title, HTML body, featured image, categories, tags) is received by this plugin from Draft2Live and saved as a normal WordPress post. * When you edit, trash, untrash or delete a post that originated from Draft2Live, the plugin sends a webhook to Draft2Live with the post ID, title, new status and modification timestamp so Draft2Live's copy stays consistent. No personal information or visitor data is transmitted. * All webhooks are signed with an HMAC-SHA256 signature using a secret that is generated during pairing and stored only on your site and on your Draft2Live account. See the **External services** section below for the full list of endpoints. = Do I need a Draft2Live account? = Yes — the plugin is the WordPress side of the Draft2Live platform. You can create a free account at [draft2live.ai](https://draft2live.ai). = How do I disconnect my site? = The safest way is to go to **Users → Profile → Application Passwords** and revoke the "Draft2Live" entry. You can also deactivate and delete the plugin from **Plugins**. Both methods immediately stop all further communication with Draft2Live. = Does the plugin support Polylang or WPML? = Yes. If either plugin is active, Draft2Live will detect it automatically during site verification and offer you multilingual publishing: you can generate one article in multiple languages and publish them all in one click, linked as translations of each other. Cross-language linking uses the Polylang REST API or the WPML language field depending on which plugin is installed. = Does the plugin support Yoast SEO or Rank Math? = Yes. If Yoast SEO or Rank Math is active, the plugin detects it and Draft2Live will push a meta title, meta description and focus keyword to the appropriate post meta fields when you publish. If neither plugin is active, only standard WordPress post fields are written. = Can I use a custom post type? = Yes. The plugin supports publishing to any registered public post type, not just posts and pages. = Does two-way sync run on every save? = Only for posts that originated from Draft2Live (identified by a hidden post meta field the plugin writes on import). Posts you created manually in WordPress are never touched by the sync. == Screenshots == 1. The plugin settings page showing the one-click "Connect to Draft2Live" button. 2. The WordPress Application Password approval screen (native WordPress UI). 3. The connected state after successful pairing — the site is ready to receive content. 4. Publishing an article from Draft2Live to the paired WordPress site. == External services == This plugin connects to Draft2Live — the SaaS backend that generates and manages your articles — so that your site can receive published content and keep it in sync. No data is sent until you explicitly pair the site. **Service:** Draft2Live **Homepage:** https://draft2live.ai **Terms of Service:** https://draft2live.ai/en/terms **Privacy Policy:** https://draft2live.ai/en/privacy **What is sent and when:** * **During pairing (one time, user-initiated):** the plugin generates a WordPress Application Password via the standard WordPress flow and sends it to Draft2Live's `/api/v1/sites/wp-callback` endpoint so the SaaS can authenticate future publish requests against your site. * **When a post that originated from Draft2Live is updated, trashed, untrashed or permanently deleted:** the plugin sends a signed webhook to `https:///api/v1/sites/webhook/{site_id}` containing the post ID, the internal Draft2Live article ID, the post title, the new post status and the modification timestamp. The webhook body is signed with HMAC-SHA256 using the secret established during pairing. * **When Draft2Live publishes or updates an article on your site:** Draft2Live calls the plugin's REST endpoints (`/wp-json/draft2live/v1/publish`, `/wp-json/draft2live/v1/posts/{id}`, etc.) authenticated with the Application Password stored during pairing. Featured images and in-content images/videos referenced in the article payload are downloaded from the URL included in the payload into your WordPress media library — URLs are validated with `wp_http_validate_url()` before any fetch. **What is not sent:** * Visitor information, analytics or tracking data * Your WordPress admin password (the plugin never receives it — Application Passwords are a one-way secret generated by WordPress itself) * Anything about posts that did not originate from Draft2Live You can stop all communication at any time by revoking the Application Password under **Users → Profile → Application Passwords**, or by deactivating / uninstalling the plugin. == Changelog == = 1.2.7 = * Security: hardened remote image/video fetching against Server-Side Request Forgery (SSRF). User-supplied `featured_image_url` (and other media URLs) are now validated with strict, defense-in-depth checks before download: HTTP/HTTPS only, the host is DNS-resolved and every resulting IP must be publicly routable (loopback, private, link-local, the 169.254.169.254 cloud-metadata address, CGNAT and reserved ranges are blocked), each redirect hop is re-validated, and the downloaded file is capped in size and confirmed to be an image/video by MIME type. Replaces the previous `wp_http_validate_url()`-only check. = 1.2.6 = * Re-publishing a previously unpublished article from Draft2Live now uses a dedicated `POST /draft2live/v1/posts/{id}/republish` endpoint that simply flips the post status back to `publish`. The original slug, categories, tags, author and any edits made on the WordPress side are left untouched, and the unpublish → re-publish cycle no longer occasionally creates duplicate posts. = 1.2.5 = * Cleanup: orphan CSS fragments left in the body from earlier inline-FAQ releases (`

.draft2live-faq { … }`, bare `.faq-section { … }` rules, legacy `.faq-section` wrappers, etc.) are now stripped automatically on every publish and update, so articles that already had leaking FAQ styles in their content get cleaned up the next time Draft2Live syncs them. = 1.2.4 = * FAQ block is now rendered server-side by the plugin via WordPress's `the_content` filter using the bundled stylesheet — the HTML and styles no longer have to be injected into `post_content` from Draft2Live. Fixes the long-standing issue where `