=== URL Embed Block ===
Contributors: snehalpancholi
Tags: embed, url, preview, link card, gutenberg, block
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

Paste any URL in the block editor to fetch and render a rich link preview card with title, description, thumbnail, and site name.

== Description ==

URL Embed Block lets editors paste any URL and automatically generate a rich preview card — similar to how link previews appear in social media apps. The block fetches Open Graph meta tags (title, description, og:image, site name) server-side using WordPress HTTP API, caches the result, and renders an accessible link card on the frontend.

**Features:**
* Paste any URL → automatic preview fetch via Open Graph / meta tags
* Displays: title, description, thumbnail image, site name, favicon
* Server-side fetching via WordPress HTTP API (no third-party services)
* Results cached with transients to avoid repeated HTTP requests
* Fields editable in Inspector Controls for manual overrides
* Accessible `<a>` element — the entire card is the link
* Fallback to plain link if metadata unavailable
* Responsive: stacks vertically on mobile

== Installation ==

1. Upload `url-embed-block` to `/wp-content/plugins/`.
2. Activate via the Plugins screen.
3. Insert the **URL Embed / Preview Card** block.
4. Paste a URL and click Embed.

== Frequently Asked Questions ==

= Does it work with all URLs? =
It works with any publicly accessible URL that serves HTML with `<meta>` or Open Graph tags. Some URLs behind paywalls, login walls, or bot-blocking may not return usable data — the block falls back to a plain link in those cases.

= Are preview results cached? =
Yes, for 6 hours per URL using WordPress transients.

= Can I override the auto-fetched data? =
Yes. Use the Inspector Controls to override title, description, thumbnail URL, and site name.

== Changelog ==

= 1.0.0 =
* Initial release.
