=== Dijital Otomasyon Bridge ===
Contributors: dijitalotomasyon
Tags: automation, content, drafts, wordpress, webhook
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 2.4.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Receives trusted automation payloads and saves them as WordPress draft posts.

== Description ==

Dijital Otomasyon Bridge connects WordPress to the Dijital Otomasyon Platform and compatible external automation tools.

The plugin receives authenticated JSON requests, creates or updates draft posts, saves SEO helper metadata, keeps editor notes, stores image prompts, imports selected Pixabay suggestions into the content, and leaves the featured image available for manual review.

Core features:

* Secure REST endpoint with API key authentication.
* Markdown package support for the Dijital Otomasyon Platform.
* Generic JSON payload support for external automation tools.
* Draft creation and draft update by slug.
* SEO metadata support for common SEO plugins and fallback post meta.
* Internal link suggestions based on existing published WordPress URLs.
* Editor notes for cover image prompts, Pixabay suggestions, and automation details.
* Built-in update channel through otomasyon.pazaryeriguru.com.

== Installation ==

1. Upload the plugin ZIP from your WordPress admin panel.
2. Activate "Dijital Otomasyon Bridge".
3. Open the Dijital Otomasyon menu in WordPress.
4. Copy the endpoint URL and API key.
5. Save them in your Dijital Otomasyon Platform WordPress connection settings.

== Frequently Asked Questions ==

= Does the plugin publish posts automatically? =

No. The plugin saves incoming content as drafts so an editor can review the content before publishing.

= Does the plugin require the Dijital Otomasyon Platform? =

The platform is recommended, but the plugin also accepts generic JSON from other trusted automation tools when the API key is provided.

= Are Pixabay images used as featured images? =

No. Pixabay suggestions can be imported into the draft content. The featured image is intentionally left for manual or Pro image workflow review.

= Where is the API key stored? =

The API key is stored in WordPress options and can be regenerated from the plugin settings page. Regenerating the key invalidates the old key.

== REST API ==

Endpoint:

`POST /wp-json/dijital-otomasyon/v1/article`

Required header:

`X-DOB-API-Key: your-api-key`

Generic JSON example:

`
{
  "title": "Sample draft title",
  "content": "Markdown or plain text content",
  "description": "Short excerpt or meta description",
  "category": "Automation",
  "tags": ["automation", "wordpress"],
  "keyword": "automation",
  "cover_prompt": "Featured image prompt for manual AI generation",
  "pixabay_query": "automation dashboard"
}
`

Status endpoint:

`GET /wp-json/dijital-otomasyon/v1/status`

External automation tools:

* Use a POST request to the article endpoint.
* Send the `X-DOB-API-Key` header.
* Send raw JSON with fields such as `title`, `content`, `description`, `category`, `tags`, and `keyword`.
* Example payloads are included in the plugin package under `examples/`.

== Changelog ==

= 2.4.3 =
* Preserved fenced Markdown code blocks as WordPress code blocks.
* Kept automatic internal-link suggestions out of code examples.

= 2.4.2 =
* Fixed loose ordered-list conversion so numbered sections remain in a single list with related bullet details nested under the right item.

= 2.4.1 =
* Clarified Bridge Free versus Platform Pro feature groups.
* Added Excel automation, scheduling, and email notifications to Platform Pro candidates.

= 2.4.0 =
* Added Free/Pro feature overview in the Bridge admin panel.
* Added free and Pro feature metadata to the Bridge status endpoint.

= 2.3.9 =
* Added in-plugin documentation with endpoint, API key header, generic JSON example, and copy buttons.

= 2.3.8 =
* Added external automation documentation and example JSON payload.
* Added PowerShell Bridge generic JSON test script.

= 2.3.7 =
* Hardened REST authentication by moving API key validation into the WordPress permission callback.
* Added request payload limits for body size, tags, image prompts, and Pixabay image suggestions.

= 2.3.6 =
* Fixed language selector autosave in WordPress admin forms.

= 2.3.5 =
* Language selector changes are now saved automatically.

= 2.3.4 =
* Automatic Bridge language now follows the WordPress locale and falls back to English only when that language is not translated.

= 2.3.3 =
* Added Bridge admin language selector with Automatic, Turkish, and English modes.
* Automatic mode follows the WordPress locale with English fallback for untranslated languages.

= 2.3.2 =
* Added WordPress.org-compatible readme.txt.
* Completed plugin header metadata.
* Added package support for languages directory.

= 2.3.1 =
* Added generic JSON payload support for external automation tools.
* Preserved the existing platform markdown package format.

= 2.3.0 =
* Added custom update channel.
* Added API key auto-generation and one-click key rotation.
* Added platform-side WordPress connection update support.

= 2.2.9 =
* Added Bridge status endpoint and compatibility reporting.

== Upgrade Notice ==

= 2.4.3 =
Preserves code examples and prevents automatic internal links from being inserted into code blocks.

= 2.4.1 =
This version clarifies Platform Pro feature visibility while preserving the existing Bridge API.
