=== NGY Simple Structured Data Box ===
Contributors: ngy758
Tags: json-ld, schema, structured data
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add and safely output manual JSON-LD for individual posts, pages, and public custom post types.

== Description ==

NGY Simple Structured Data Box adds one focused JSON-LD input box to enabled WordPress editing screens.

* Enable the box for posts, pages, and selected public custom post types.
* Restrict editing and saving JSON-LD to administrators.
* Format and validate JSON in the editor.
* Keep invalid input available for correction without preventing a post from saving.
* Output only valid JSON-LD, safely re-encoded in the document head.
* Remove one pasted outer `script type="application/ld+json"` wrapper automatically.
* Copy a prompt for ChatGPT or Gemini without connecting to an API or sending content automatically.
* Copy prompts only for published content, so AI services receive a public URL rather than draft or private content.
* Open Schema.org Validator and Google Rich Results Test in a new tab. Published posts send only their public URL; drafts and private content do not send a preview URL.

This plugin does not generate schemas, connect to an AI API, expose its meta data through the REST API, or add frontend JavaScript.

== Installation ==

1. Upload the `ngy-simple-structured-data-box` folder to `/wp-content/plugins/`, or install the ZIP through the Plugins screen.
2. Activate NGY Simple Structured Data Box.
3. Open Settings > NGY Simple Structured Data Box and select the post types that should show the box.
4. Edit an enabled post type and enter JSON-LD in the NGY Simple Structured Data Box meta box.

== Frequently Asked Questions ==

= Does invalid JSON prevent a post from being saved? =

No. The latest input is kept so it can be corrected later, but invalid JSON-LD is never output on the public page.

= Can I paste a JSON-LD script tag? =

Yes. One outer `script type="application/ld+json"` wrapper is removed before the value is saved.

= Does the plugin send data to ChatGPT or another service? =

No. It only opens ChatGPT or Gemini after you click a link and copies a prompt when you request it. Prompts and external validators use a public URL only for published content.

== Changelog ==

= 0.1.0 =
* Initial release.

== 日本語 (Japanese) ==

= 概要 =

NGY Simple Structured Data Box は、投稿・固定ページ・公開カスタム投稿タイプごとにJSON-LDを手入力し、安全に出力するためのシンプルなプラグインです。

* 設定画面でJSON-LD入力欄を表示する投稿タイプを選択できます。
* JSON-LDの編集・保存は管理者だけに制限されます。
* エディター上でJSONを整形・構文検証できます。
* 不正なJSONでも投稿の保存を妨げず、修正用に入力内容を保持します。
* 有効なJSON-LDだけを安全に再エンコードしてhead内へ出力します。
* 貼り付けたJSON-LD用scriptタグの外側ラッパーを1つだけ取り除きます。
* API連携なしでChatGPTまたはGemini向けのプロンプトをコピーできます。
* プロンプトのコピーは公開済みコンテンツに限られ、下書き・非公開コンテンツの情報を外部サービスへ渡しません。
* 公開済みコンテンツは公開URL付きでSchema.org ValidatorとGoogle Rich Results Testを開きます。下書き・非公開コンテンツのプレビューURLは送信しません。

= インストール =

1. `ngy-simple-structured-data-box` フォルダを `/wp-content/plugins/` にアップロードするか、プラグイン画面からZIPをインストールします。
2. NGY Simple Structured Data Box を有効化します。
3. 「設定 > NGY Simple Structured Data Box」で入力欄を表示する投稿タイプを選択します。
4. 対象の投稿編集画面でJSON-LDを入力します。

= よくある質問 =

不正なJSONを保存するとどうなりますか？

投稿自体は保存され、JSON-LDの入力内容も修正用に残ります。ただし公開ページには出力されません。

ChatGPTなどの外部サービスにデータが送信されますか？

いいえ。プロンプトのコピーとChatGPTまたはGeminiを開く操作は明示的なクリック時だけです。公開済みコンテンツの公開URLだけを、プロンプトおよび外部バリデーターに使用します。

= 変更履歴 =

**0.1.0**
* 初回リリース。
