=== AddonLogic Custom Field Display Shortcode ===
Contributors: snehalpancholi
Tags: custom fields, post meta, shortcode, field display, meta
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

A [field] shortcode that safely outputs any post meta value with optional formatting, wrapping, and fallback defaults.

== Description ==

Custom Field Display Shortcode lets you embed any registered post meta value directly in your post content, page, or widget using a simple shortcode. Output is always properly escaped for the chosen format.

**Core Features:**

* `[field key="your_meta_key"]` shortcode
* Nine output formats: text, html, url, email, number, currency, date, datetime, image
* Before/after wrapper text attributes
* Fallback default value when meta is empty
* Cross-post display via `post_id` attribute
* Security whitelist for allowed meta keys
* Zero jQuery dependency

== Installation ==

1. Upload the `custom-field-display-shortcode` folder to `/wp-content/plugins/`.
2. Activate via **Plugins > Installed Plugins**.
3. Go to **Settings > Custom Field Display** to configure allowed keys.
4. Use `[field key="your_key"]` in any post, page, or widget.

== Frequently Asked Questions ==

= Is the output safe? =
Yes. All output is escaped per format — esc_html for text, esc_url for URLs, sanitize_email for email, wp_kses_post for HTML.

= Can I display fields from another post? =
Yes. `[field key="my_key" post_id="42"]`

= What happens if the meta key is empty? =
The shortcode returns the default= value, or nothing if no default is set.

= Can editors use any meta key? =
In Whitelist mode (default), only keys you explicitly allow in Settings can be displayed. Switch to Open mode to allow any key.

== Changelog ==

= 1.0.0 =
* Initial release.

== Screenshots ==

1. Settings page showing security mode and allowed keys configuration.
2. Shortcode reference table on the settings page.
3. Example output: text, URL, and date formats on the frontend.
