Description
GymGrow Connect adds a small set of secure REST API endpoints under the gymgrow/v1 namespace so an external system (for example, an AI content pipeline) can:
- Create or update a post — title, content, excerpt, slug, categories, tags, schedule date — in a single request.
- Set SEO fields (SEO title, meta description, focus keyword, canonical URL, robots) on the same request or on an existing post. The active SEO plugin is auto-detected: RankMath or Yoast SEO.
- Upload an image from a multipart file or a remote URL, set its alt text, and optionally assign it as the featured image.
It replaces ad-hoc 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).
A backward-compatible alias 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.
Installation
- Upload the
gymgrow-connectfolder to/wp-content/plugins/, or install the ZIP via Plugins Add New Upload Plugin. - Activate the plugin through the Plugins screen. An API key is generated automatically on activation.
- Visit Settings GymGrow Connect, copy the API key (and your site URL), and paste them into the GymGrow portal’s connection screen.
- (Optional) Choose a default category and default status on the same settings screen.
FAQ
-
Does it require RankMath or Yoast?
-
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.
-
How are the endpoints secured?
-
Each route has a
permission_callback. A request carrying a validX-GymGrow-Keyheader 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. -
Does it send data anywhere?
-
No. The plugin only receives requests; it does not phone home or contact third-party services.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“GymGrow Connect” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “GymGrow Connect” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.4.1
- The “All articles ” footer link follows the hub page wherever it lives: if the plugin’s page is gone, a published page titled “Blog” (or Training Resources, Artigos, Articles) is used instead of a fixed /training-resources/ URL, and with no such page the link goes to the blog category archive.
- A hub page with its own content (for example one rebuilt in a page builder) is never re-rendered or renamed by the plugin.
1.4.0
- Brings the WordPress.org release up to date with versions 1.1.0–1.3.0 below. This build updates through WordPress.org as usual.
1.3.0
- The articles hub page and the “Latest from our blog” footer now follow the site’s content language: English (Training Resources, /training-resources/), Portuguese (Artigos, /artigos/) or French (Articles, /articles/).
- New “Site content language” setting (Settings GymGrow Connect), also writable as
gymgrow_connect_languagethrough/wp/v2/settings. Auto follows the WordPress locale. - An existing hub page is renamed to match the language unless its title was changed by hand.
1.2.0
- The article endpoint accepts
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. - The article endpoint’s response now includes the post’s
categories, so the portal can confirm where a post landed.
1.1.1
- Fix: the “Latest from our blog” footer block (and the Training Resources hub page) was never loaded after 1.1.0 because the blog-feed class was not wired into the plugin loader. It now renders again on the front end.
1.1.0
- API-key authentication: a connection key is auto-generated on activation and shown prominently in settings. A valid
X-GymGrow-Keyheader now authorises publish/upload/SEO directly, with no Application Password required. - New
POST /gymgrow/v1/verify-connectionhandshake endpoint returns the site URL and WordPress version so the GymGrow portal can confirm the pairing.
1.0.0
- Initial release: article publish endpoint, media upload endpoint, RankMath SEO endpoint, optional API key, settings screen.