[WordPress] 外掛分享: 4WP Drive

首頁 › 外掛目錄 › 4WP Drive
WordPress 外掛 4WP Drive 的封面圖片
全新外掛
安裝啟用
★★★★★
5/5 分(1 則評價)
25 天前
最後更新
100%
問題解決
WordPress 6.4+ PHP 7.4+ v1.7.0 上架:2026-06-13

內容簡介

4WP Drive 將 Google Drive 和 GitHub 的文件工作流程連接到 WordPress,讓編輯團隊能夠輕鬆地將草稿轉換為文章,並自動更新現有內容,提升內容管理效率。

【主要功能】
• Google Drive OAuth 連接,安全儲存令牌
• 文件夾同步,支援多種文件格式
• GitHub 直接來源,實時處理 Markdown 文件
• 編輯狀態列,方便管理文件進度
• 預覽功能,快速查看文件內容

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.7.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「4WP Drive」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

4WP Drive connects Drive and GitHub folder workflows to WordPress: writers drop documents in incoming/, editors review them on the admin Incoming screen, and approved content becomes draft posts or updates existing posts and pages—without copy-paste. Analytics stores import history (folder alias, site slug, incoming → published) for drafts and published posts.
A plugin by 4wp.dev.
Learn more, workflow details, and comparisons on the plugin page at 4wp.dev/plugin/4wp-drive/.
Perfect for

Editorial teams that draft in Google Docs but publish in WordPress
Agencies with a shared Drive or GitHub incoming/ folder and a review step before publish
Content pipelines that need structured front-matter (title, slug, categories, SEO fields) parsed from the doc header
Sites that want API credentials stored encrypted and OAuth handled server-side

How it works

Install and activate 4WP Drive.
Connect a storage source in Settings → Storage sources: Google Drive (OAuth) and/or GitHub (PAT + owner/repo).
Drive: set the root folder ID; the plugin uses incoming/ and published/ subfolders. GitHub: set the repo and incoming path (default incoming/).
Drop a package into incoming/ (Google Doc, Markdown, or Word on Drive; Markdown on GitHub) or run Sync.
Open Incoming — pick a source tab (Google Drive or GitHub live; OneDrive and Dropbox on the roadmap), sync, select a document, then preview and Create new draft, Update existing post, or Reject.
On import, files move to published/. Open Analytics to see history (drafts and published).

Key features

Google Drive OAuth — connect an admin Google account; tokens stored encrypted
Folder sync — scan incoming/ for Google Docs, Markdown, Word, and images (Drive) or Markdown packages (GitHub)
GitHub — live Markdown source: PAT, owner/repo, move to published/failed after import
Editorial Incoming — status bar, source tabs, lazy folder tree, document queue + side workspace for preview and import
Package images — preview jpg/png in Incoming; drag from the tree or click to pin, pick left/center/right, drop/click a paragraph ([image:file.png left])
Analytics — import history for drafts and published posts (source, post, folder alias, site slug, incoming → published)
Document template — front-matter lines before a separator (--- or =====) map to post fields; body becomes post content (headings, lists, bold preserved)
Patterns — Core Block always; Integrations Plugins catalog (4WP FAQ, 4WP SEO Helper TechArticle) with install/activate links; Custom Blocks later
Body → block templates — FAQ accordion via 4WP FAQ; TechArticle Goal / Context / Steps / Common mistakes via 4WP SEO Helper; Core Image (default on) replaces [image:filename.jpeg] with core/image from the package folder
Configurable field map — title, slug, categories, tags, author, dates, SEO meta (when supported)
Featured image — import image from the same Drive subfolder
Update existing content — search and pick a post or page, then replace its content from the Drive document
Polylang multilingual import — pick content language in Incoming when the site has multiple languages; assign language on create; filter update targets by language (WPML planned)
REST API + WP-CLI wp forwp-drive sync for manual sync
Roadmap sources — OneDrive and Dropbox

Privacy
OAuth tokens and Google API credentials are stored in your WordPress database (encrypted). Document content is fetched from Google Drive only when an administrator runs sync or import. No visitor-facing tracking.
4WP is our project brand; the letters “WP” appear only as part of that brand name, not as a reference to WordPress. This plugin is not affiliated with, endorsed, or sponsored by WordPress.
Source code: github.com/4wpdev/4wp-drive
Plugin overview and FAQ: 4wp.dev/plugin/4wp-drive/
Development
Human-readable PHP source is in the public GitHub repository above. The plugin ZIP includes src/ (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
External services
This plugin connects to Google services when an administrator configures OAuth and syncs or imports documents.
Google OAuth 2.0
Used to authorize access to the connected Google account’s Drive files.

Authorization URL: https://accounts.google.com/o/oauth2/v2/auth
Token URL: https://oauth2.googleapis.com/token
Scope: https://www.googleapis.com/auth/drive

When an administrator clicks Connect Google Drive, the browser is redirected to Google to sign in and grant access. WordPress stores refresh and access tokens encrypted in the site database. Client ID and Client Secret are stored encrypted (or may be defined in wp-config.php).
Google terms: https://policies.google.com/terms
Google privacy: https://policies.google.com/privacy
Google Drive API
Used to list folders, download Google Docs (export as HTML/DOCX), and move files after import.

API hostname: https://www.googleapis.com/drive/v3/ (and related export endpoints)

Requests are made server-side only when an administrator runs sync, preview, or import. Document metadata and file content are processed on your server to create WordPress posts.
Google Drive API terms follow Google Cloud / Google API Services terms linked from the Google Cloud Console.
GitHub REST API
Used when an administrator saves a personal access token and syncs or imports from a GitHub repository.

API hostname: https://api.github.com/
Typical calls: repository metadata, Contents API (list, read, create, delete) to move files after import or restore

Requests are made server-side only. 4WP Drive uses the configured owner/repository. A classic token with repo scope can access other repositories the GitHub account can reach; a fine-grained token can be limited to one repository (Contents: Read and write).
GitHub terms: https://docs.github.com/en/site-policy/github-terms/github-terms-of-service
GitHub privacy: https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement

延伸相關外掛

文章
Filter
Mastodon