=== Pantheon Content Publisher ===
Contributors: getpantheon, a11rew, anaispantheor, roshnykunjappan, mklasen, jazzs3quence, swb1192
Tags: pantheon, acf, google docs
Requires at least: 6.5
Tested up to: 7.0
Stable tag: 1.3.6
Requires PHP: 8.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

**The Pantheon Content Publisher plugin for WordPress enables seamless content publishing from Google Drive and Google Docs directly to WordPress sites.**

Perfect for editorial teams who collaborate on content within Google Docs, this plugin ensures a smooth transition from document creation to web publishing, facilitating real-time previews and direct publishing options.

== Features ==

= Real-time Preview =
Experience seamless document previews within your WordPress environment as they would appear live on the web.

= One-click Publishing =
Enable direct publishing from Google Docs to WordPress, simplifying content management and streamlining workflows.

= Custom Post Type Support =
Publish content to any public post type registered on your WordPress site, including custom post types. Authors can also specify the target post type per document via metadata.

= ACF Integration =
Sync Content Publisher metadata fields to Advanced Custom Fields (ACF). Navigate to Settings > Pantheon Content Publisher > Integration tab to define field mappings per post type. Each tab shows ACF fields from the field groups assigned to that post type — enter the exact Content Publisher metadata field name (case-sensitive) to create a mapping. Mapped values are automatically applied on every publish. Sync errors are displayed in the Integration tab and auto-clear after one hour. Requires the ACF plugin (free or Pro) to be installed and active. Works with custom post types.

For more information, please check [Pantheon Content Publisher documentation](https://docs.content.pantheon.io).

== Installation ==

The Pantheon Content Publisher plugin can be installed like any other WordPress Plugin, from your WordPress Dashboard, go to Plugins -> Add Plugin and search for: Pantheon Content Publisher, click the Install Now button and then click Activate.

After the plugin is active, set up your connection to Pantheon Content Publisher and Google Drive via the settings page in the WordPress admin dashboard.

Once connected:

* **Connection tab** — Configure collections and choose the target post type (including custom post types).
* **Integration tab** — Map Content Publisher metadata fields to ACF fields per post type (requires the ACF plugin).

== Integration with Third-Party Services ==

= Important Disclosure =
This plugin integrates with Google Drive and Google Docs to facilitate document publishing to WordPress.
When enabled, it will access documents from these services for the purposes of rendering previews and enabling publishing functionality via the [Pantheon Content Publisher service](https://docs.content.pantheon.io). These services are not processing any data or content originating from WordPress or the plugin itself and no other third-party service is used to process data.
Pantheon Content Publisher policies and terms are available at [https://legal.pantheon.io/](https://legal.pantheon.io/)

This plugin makes use of the Apollo open-source GraphQL Client library and references its [Chrome extension](https://chromewebstore.google.com/detail/apollo-client-devtools/jdkknkkbebbapilgoeccciglkfbmbnfm).
Google Chrome Web Store: [Terms of Service](https://ssl.gstatic.com/chrome/webstore/intl/en/gallery_tos.html),  [Privacy Policy](https://policies.google.com/privacy?hl=en).

Mozilla/FireFox:  [Terms of Service](https://www.mozilla.org/en-US/about/legal/terms/mozilla/), [Privacy Policy](https://www.mozilla.org/en-US/privacy/websites/)

This library only suggests the use of this tool to developers. Users don't interact with it and no data is exchanged with this service.

This service is provided by [Apollo](https://www.apollographql.com). See the [Apollo Term of Service](https://www.apollographql.com/Apollo-Terms-of-Service.pdf) and [Apollo Privacy Policy](https://www.apollographql.com/Apollo-Privacy-Policy.pdf) for details on terms.

= Data Handling =
User documents from Google Drive are accessed and processed to generate content on WordPress.
No other personal data is shared with or stored on third-party services beyond this operational scope.

== Frequently Asked Questions ==

= How do I connect Pantheon Content Publisher to Google Drive? =
Create a management token at https://content.pantheon.io/dashboard. Proceed to the Pantheon Content Publisher settings page in your WordPress admin dashboard and paste the token into the "Management token" field.
The connection will be established automatically.

= What happens if I disconnect Pantheon Content Publisher from my Google Drive? =
All posts/pages created with Pantheon Content Publisher will remain on your WordPress site. However, you will no longer be able to edit them from Google Docs.

= How do I map metadata to ACF fields? =
Go to Settings > Pantheon Content Publisher > Integration tab. Select a post type tab, then enter the exact Content Publisher metadata field name next to each ACF field you want to map. Values sync automatically on every publish. The ACF plugin (free or Pro) must be installed and active.

= Does the ACF integration require the ACF plugin? =
Yes. The ACF plugin must be installed and active. If ACF is not detected, the Integration tab displays a warning and field mappings are skipped during publish.

= Can I publish to custom post types? =
Yes. When creating or editing a collection, select the target post type from the dropdown. You can also select "Chosen by the author" to let document authors control the post type via the `wp-post-type` metadata field.

== Changelog ==

= 1.3.6 (14 August 2026) =
* Compatibility: Supports PHP 8.5 (#217)
* Compatibility: Supports WordPress 7.0
* Fix: Updated npm and Composer dependencies (#221, #231, #232, #233, #236)

= 1.3.5 (5 March 2026) =
* Feature: ACF integration — sync Content Publisher metadata fields to Advanced Custom Fields with per-post-type mappings [#201](https://github.com/pantheon-systems/pantheon-content-publisher-wordpress/pull/201)
* Feature: Add support for publishing to custom post types with author-choice mode via `wp-post-type` metadata field [#193](https://github.com/pantheon-systems/pantheon-content-publisher-wordpress/pull/193)
* Fix: Async thumbnail generation for featured images to prevent PHP-FPM timeouts on Pantheon [#196](https://github.com/pantheon-systems/pantheon-content-publisher-wordpress/pull/196)
* Fix: Webhook secret validation is now optional rather than required, preventing 500 errors for unconfigured secrets [#195](https://github.com/pantheon-systems/pantheon-content-publisher-wordpress/pull/195)

= 1.3.4 (1 December 2025) =
* Compatibility: Supports Wordpress 6.9 [#178](https://github.com/pantheon-systems/pantheon-content-publisher-wordpress/pull/178)

= 1.3.3 (5 November 2025) =
* Fix: Fixed plugin not loading on WordPress.org due to missing build files

= 1.3.2 =
* Fix: Resolved issue loading Content Publisher admin screen

= 1.3.1 =
* Add migration script to update post metadata and wp options with the new cpub_ prefix
* Compatibility: Update plugin naming, prefixes and structure for WordPress.org submission
* Compatibility: Change main plugin file name to match WordPress.org requirements
* Security: Add sanitization for signatures and nonces
* Security: Add nonce verification for all REST API endpoints

= 1.3.0 =
* Feature: Introduces new improved UI for the plugin settings page.
* Feature: Adds support for connecting existing content collections to WordPress.

= 1.2.7 =
* Fix: Resolves issue where duplicate posts would be created when publishing from Google Docs.
* Feature: Adds linking of posts to authors by default

= 1.2.6 =
* Feature: Add support for draft publishing level and versioning

= 1.2.6-dev =
* Compatibility: Supports PHP 8.4

= 1.2.5 =
* Fix: Disables the plugin disconnecting itself when the site URL changes
* Fix: Resolves import issue with webhook handling

= 1.2.4 =
* Feature: Adds support for article.publish webhook event
* Fix: Adds support for linking between documents intra-site

= 1.2.3 =
* Feature: Display collection ID on Connected Content Collection page.
* Feature: Improve preview request handling.
* Fix: Disables caching of preview pages.
* Fix: Correct font size for documentation link text.
* Fix: Updates "Access token" mention in setup page to "Management token" to more accurately reflect the required token type.
* Compatibility: Update pcc-sdk-core dependency.

= 1.2.2 =
* Compatibility: Ensure adherence to WP Plugin guidelines
* Compatibility: Save <style> tag at the end of post content
* Stability: Improve edge case handling for PCC articles
= 1.2.1 =
* Fix: Ensure clean excerpts for PCC articles
* Compatibility: Improve image upload compatibility
= 1.2.0 =
* Feature: Add support for the title, description, tags, categories and featured image custom metadata fields
* Revert: Re-Enable the WordPress editor for PCC articles
= 1.1.2 =
* Feature: Add disconnect button on intermediary screens of auth/config flow
= 1.1.1 =
* Fix: Verify collection URL logic
= 1.1.0 =
* Feature: Check if plugin is correctly configured before hooking logic
* Feature: Disconnect collection when site URL changes
* Fix: enable style tags globally
= 1.0.1 =
* Fix: Update PCC PHP SDK dependency
= 1.0.0 =
Initial Release
