| 开发者 |
4wpdev
anatolikkk |
|---|---|
| 更新时间 | 2026年9月4日 04:17 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
incoming/ folder and a review step before publishincoming/ and published/ subfolders.incoming/ or run Sync.published/ in Drive.incoming/ for new Google Docs and images--- or =====) map to post fields; body becomes post content (headings, lists, bold preserved)wp forwp-drive sync for manual syncsrc/ (PSR-4 autoload via src/Autoload.php when vendor/ is absent). No npm build step — admin scripts ship as plain JS in assets/.
Run tests: composer install && composer test && composer run lint
/wp-content/plugins/4wp-drive/ or install from the Plugins screen.FORWP_DRIVE_GOOGLE_CLIENT_ID, FORWP_DRIVE_GOOGLE_CLIENT_SECRET, or FORWP_DRIVE_OAUTH_REDIRECT_URI in wp-config.php.Yes. Create OAuth 2.0 credentials (Web application), enable the Google Drive API, and register the redirect URI shown in the plugin Documentation tab.
Google Docs in incoming/ (single doc or subfolder with doc + image). Front-matter uses Label: value lines before a separator paragraph (--- or a row of = characters). The rest is post body.
No. OAuth and Drive requests run on the server. Only administrators with manage_options can connect Drive and import.
Yes. Use FORWP_DRIVE_GOOGLE_CLIENT_ID and FORWP_DRIVE_GOOGLE_CLIENT_SECRET constants.
Yes. Use the OAuth redirect (local) field when Google rejects your site hostname; register the same loopback URI in Google Cloud Console.
Yes. In Inbox → Preview, choose Update existing post, search or pick a target, and confirm. The document content is imported into that post. Use Import as Draft when you want a new post instead.
The plugin updates title, content, mapped categories/tags, SEO meta (when configured), and featured image (when the Drive folder includes an image). Optional front-matter date updates post_date when present. The post slug and status (published, draft, etc.) stay as they were unless your site or other plugins change them.
Only posts of the configured import post type (for example Posts or Pages under Document template). Targets must be posts you can edit (edit_post). Published, draft, pending, private, and scheduled posts are supported. The picker can suggest a match by document slug or title before you search.
You must select a target and confirm before import. If the slug or title in the document matches an existing post, the plugin may suggest that post first—you still choose explicitly. Always preview the document before updating production content.
It works with whichever post type you set as the import type in Document template. Switch the import type to Page (or another public type with editor support) to update pages instead of posts. The target must match that same type.
Polylang (1.2.0): When more than one language is configured, open Inbox → Preview & import and select Content language before import (no default). New drafts receive that language; Update existing post lists and validates targets in the selected language only. Language is not read from Drive folder names. WPML: Shown as Planned under Settings → Multilingual integration; not used for import in this release. Single-language sites (no Polylang) behave as before — no language picker in the Inbox.
4WP Drive → Settings → Storage sources — scroll to Multilingual integration. Cards show Polylang (live), WPML (planned), and single-language fallback, with status badges (Active, Inactive, Not installed, Planned).
forwp/faq + core accordion (requires 4WP FAQ plugin).core/accordion only (no FAQ wrapper).language on document import; lang on import-targets; multilingual payload on inbox, preview, settings, and targets.Language_Provider_Interface, Language_Provider_Registry, Import_Language_Resolver; filter forwp_drive_language_providers. WPML provider class kept; not enabled for import until a future release.Post_Creator::update_existing() and Import_Target_Resolver for safe target validation.