
Cobar Connector
v1.0.2Cobar · 2026年11月7日 上架
Lets Cobar publish an approved article to this site in one request, with its images and its SEO title, meta description and structured data.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 258
- 最近更新
- 2026年11月8日
贡献者
Cobar is where a marketing team prepares and approves articles. This plugin lets Cobar publish an approved article to your WordPress site.
Without the plugin, Cobar publishes through WordPress’s standard REST API. That takes 10 to 15 requests per article and has no place for an SEO title, meta description or structured data, and some hosts turn away that many requests in a row.
With the plugin, Cobar checks that the plugin is installed, then sends the whole article in one request. The plugin:
- uploads the article’s images and sets the first one as the featured image,
- creates the post, or finishes one an interrupted attempt started, and publishes it,
- when Yoast SEO or Rank Math is active, writes the SEO title and meta description where that plugin reads them, and puts the article’s structured data in that plugin’s own JSON-LD in place of its own article entry.
With neither SEO plugin active the article still publishes, and Cobar is told which SEO values were not sent. Sending the same article again never makes a second post.
The plugin prints nothing on your pages by itself. It has no settings screen and no external dependencies.
Security
- Authentication is WordPress’s own: an application password for a WordPress user (Users > Profile > Application Passwords).
- Checking the plugin’s status needs a user who can write posts. Publishing needs a user who can publish posts, upload files when the article has images, and edit the post when Cobar is finishing one it started.
- Every input is validated and size-limited: images must be real JPEG, PNG or WebP files of at most 10 MB, and the whole request at most 48 MB (or the server’s post_max_size, if smaller). Article HTML goes through wp_kses_post and SEO text through sanitize_text_field. A value the sanitizer would change is not written; structured data containing “<” is not written.
- Error messages never repeat what was sent.
Privacy and external services
The plugin connects to no external service. It sends no data anywhere, loads nothing from other servers, and collects no analytics.
Cobar (https://cobar.ai) calls the plugin on your site, using the application password you create for it, to publish articles you approved in Cobar. Cobar’s terms and privacy policy cover that service: https://cobar.ai/terms and https://cobar.ai/privacy.
The plugin stores on your site only what a publish needs: the posts and images it creates, their SEO fields, and on each one a Cobar delivery id so a repeated publish finds the same post.
REST API reference
Namespace cobar/v1.
GET /wp-json/cobar/v1/status returns `plugin` ("cobar-connector"), `plugin_version`, `wordpress_version`, `seo_plugin` ("yoast", "rankmath" or "none"), `can_publish`, `can_upload`, `accepts` (the SEO values the active SEO plugin can take: any of "title", "description", "schema"), `max_body_bytes` and `max_image_bytes`.
POST /wp-json/cobar/v1/publish takes `delivery_id`, `title`, `content_html`, `slug`, `status` ("publish"), `categories` and `tags` (names; a missing term is created only if the user may create terms), `images` (`position` "hero" or "section_N", `alt_text`, `mime_type`, `data_base64`, `filename`) and `seo` (`title`, `description`, `schema`, each optional). It returns `post_id`, `link`, `status`, `media` (`position`, `id`, `url`), `seo` (`written`, `not_sent`) and `terms_skipped`.
Image placement: content_html is the final article HTML with each image written as src="cobar-image:N", where N is that image’s index in images. Each image must be placed exactly once. The plugin replaces each placeholder with the uploaded image’s address. The hero image becomes the featured image.
Idempotency: delivery_id is stored on the post (_cobar_delivery_id) and on each uploaded image (with _cobar_position). The same delivery_id again returns the post it already published and writes nothing. An attempt that stopped part way (a draft, some images uploaded) is completed, reusing what exists. While one attempt is running, a second with the same delivery_id is refused with cobar_in_progress (HTTP 409).
Refusals: cobar_invalid_request and cobar_too_large (400), rest_not_logged_in (401), cobar_forbidden (403), cobar_slug_taken, cobar_post_changed and cobar_in_progress (409), cobar_too_large (413, whole request), cobar_upload_failed and cobar_write_failed (500).