=== AddonLogic Conditional Field Display ===
Contributors: snehalpancholi
Tags: conditional logic, meta box, custom fields, post editor
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show or hide WordPress meta boxes in the post editor based on another field's value — no coding required.

== Description ==

AddonLogic Conditional Field Display lets you create rules that control which meta boxes are visible in the post editor. When a trigger field meets your condition (equals, contains, is empty, etc.), the target meta box is automatically shown or hidden. Rules apply in real time as the editor fields change.

**Key Features:**

* Rules engine: trigger field + condition + value → show or hide a meta box
* Operators: equals, does not equal, contains, is not empty, is empty
* Works with any meta box on any public post type
* Real-time evaluation via JavaScript — no page reload required
* MutationObserver handles dynamic editor reloads
* Settings page to create and delete rules
* No coding required

== Installation ==

1. Upload the `conditional-field-display` folder to `/wp-content/plugins/`
2. Activate through the 'Plugins' menu
3. Go to **Settings → Conditional Fields**
4. Add a rule: choose post type, trigger meta key, condition, value, target meta box ID, and effect
5. Open a post of that type to see the rule in action

== How It Works ==

Rules are defined by:
1. **Post Type** — which post type the rule applies to
2. **Trigger Field** — the name attribute of the input that controls the condition
3. **Condition** — equals / does not equal / contains / is not empty / is empty
4. **Value** — the value to compare against (leave blank for is_empty/not_empty)
5. **Target Meta Box** — the HTML id of the meta box to affect
6. **Effect** — show or hide the meta box when the condition is true

== Changelog ==

= 1.0.0 =
* Initial release

== Screenshots ==

1. Settings page — Add Rule form with all options
2. Settings page — Active rules table
3. Post editor — meta box hidden/shown based on another field's value
