| 开发者 | gymgrowplugin |
|---|---|
| 更新时间 | 2026年10月21日 22:20 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.8 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
gymgrow/v1 namespace so an external system (for example, an AI content pipeline) can:
functions.php snippets with a versioned, capability-checked plugin.
Endpoints
POST /wp-json/gymgrow/v1/article — publish/update an article (also sets SEO and featured image).POST /wp-json/gymgrow/v1/media — upload an image.POST /wp-json/gymgrow/v1/seo/{id} — update SEO fields for a post (RankMath or Yoast, whichever is active).POST /wp-json/custom/v1/rankmath/{id} is also registered for pipelines that used the legacy route.
Authentication
Requests are authenticated with the plugin's own API key, sent in the X-GymGrow-Key header. The key is generated automatically on activation and shown under Settings → GymGrow Connect. A valid key authorises publish, upload and SEO requests directly — no WordPress username or Application Password is required. (Requests from a logged-in user with the right capabilities still work as a fallback.)
This plugin does not call any external services and stores no personal data.
gymgrow-connect folder to /wp-content/plugins/, or install the ZIP via Plugins → Add New → Upload Plugin.No. The plugin auto-detects the active SEO plugin: if RankMath is active it writes RankMath meta, if Yoast SEO is active it writes Yoast meta, and if both are active it writes both. If neither is active the meta is stored under the RankMath keys and becomes live once RankMath is installed.
Each route has a permission_callback. A request carrying a valid X-GymGrow-Key header is authorised for publish, upload and SEO. Without a key, the plugin falls back to WordPress capability checks (publish_posts, upload_files, edit_post) for a logged-in user.
No. The plugin only receives requests; it does not phone home or contact third-party services.
gymgrow_connect_language through /wp/v2/settings. Auto follows the WordPress locale.create_categories ([{ slug, name }]) to create a missing category before publishing. Used by GymGrow announcements, which publish to an events category separate from the blog.categories, so the portal can confirm where a post landed.X-GymGrow-Key header now authorises publish/upload/SEO directly, with no Application Password required.POST /gymgrow/v1/verify-connection handshake endpoint returns the site URL and WordPress version so the GymGrow portal can confirm the pairing.