=== Upcellia Forms oEmbed ===
Contributors: upcellia
Tags: oembed, embed, forms, upcellia, iframe
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed Upcellia web forms in WordPress using the core Embed block.

== Description ==

This plugin registers **f.upcellia.com** as an oEmbed provider in WordPress. Paste a public Upcellia form URL into the **Embed** block to display the form in posts, pages, and previews.

**Features**

* Registers the oEmbed provider with `wp_oembed_add_provider()`
* Works with the generic Gutenberg Embed block
* Clears stale oEmbed caches when saving posts
* No settings screen: activate and embed
* Full-width embed styles on the frontend

**Requirements**

* Forms published on [Upcellia](https://upcellia.com)
* Public URL format: `https://f.upcellia.com/{code}`

**Usage**

1. Activate the plugin.
2. In the editor, add an **Embed** block.
3. Paste your form URL, for example:
   `https://f.upcellia.com/St4xnF?utm_source=web&utm_medium=website`
4. Save the post and check the preview.

== Installation ==

= Automatic installation =

1. Go to **Plugins > Add New** in WordPress.
2. Search for **Upcellia Forms oEmbed**.
3. Click **Install Now**, then **Activate**.

= Manual installation =

1. Download the plugin ZIP file.
2. Go to **Plugins > Add New > Upload Plugin**.
3. Select the ZIP and activate the plugin.

= Must-Use (optional) =

To force-load on multisite or controlled environments, copy `upcellia-forms-oembed.php` to `wp-content/mu-plugins/`.

== Frequently Asked Questions ==

= The editor shows the form but the preview only shows a link =

Save the post again (Update or Publish). WordPress caches oEmbed responses on save. If the first attempt failed, the preview may show only the URL until the cache is refreshed.

= Do I need to configure anything? =

No. The plugin only registers the Upcellia oEmbed endpoint. Forms are created and published from the Upcellia admin panel.

= Does it work without this plugin? =

WordPress may discover oEmbed via metadata on `f.upcellia.com`, but this plugin improves reliability in PHP previews and on the frontend.

= Can I use an iframe instead of oEmbed? =

Yes. In Upcellia, open **Get embed code** in the form builder and use the **Custom HTML** block with the iframe code.

== Screenshots ==

1. Embed block with a Upcellia form URL
2. Embedded form on a published post

== Changelog ==

= 1.0.3 =
* Plugin Check: replace str_contains() for WordPress 5.8 compatibility.
* Plugin Check: use delete_post_meta() instead of direct database queries.

= 1.0.2 =
* Readme and plugin description in English (WordPress.org requirement).
* Contributors list updated.

= 1.0.1 =
* Full-width embed in the Embed block (CSS + fluid iframe).
* Better compatibility with WordPress oEmbed maxwidth.

= 1.0.0 =
* Initial release.
* oEmbed registration for f.upcellia.com.
* oEmbed cache cleanup on save.
* wp-embedded-content class on iframes.

== Upgrade Notice ==

= 1.0.2 =
English readme and minor metadata updates for WordPress.org review.
