=== MisticEase ===
Contributors: misticuantum
Tags: lightbox, popup, modal, video popup, youtube
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Paste video URLs in WordPress to create popup thumbnails or title links. Visitors can drag an open popup into floating mode.

== Description ==

Paste a supported YouTube, YouTube Shorts, Vimeo, or Dailymotion URL into a WordPress page or post and publish. MisticEase prepares a clickable thumbnail and popup without embed code, custom HTML, extra classes, or special attributes.

Instead of loading a video player with the page, MisticEase displays a locally cached thumbnail and loads the player only after a visitor clicks it. This helps reduce the performance cost of embedded media.

To place a video naturally inside a sentence, add `n/` directly before the URL. MisticEase displays the video title as a text link instead of a thumbnail. The video still opens in the same popup.

Visitors can drag an open popup into floating mode and keep it beside the page while reading or following instructions. Supported Media Library images can also open in a popup viewer and be viewed in sequence.

For normal use, choose your defaults in the settings panel and paste a supported URL. When one item needs a different size, label, caption, or display behavior, MisticEase Slash Markup can override the defaults for that item only.

Detailed guidance is available inside the plugin after installation. You can also try the [MisticEase live demo](https://mitum.me/misticease/).

== Features ==

* Turn supported video URLs into clickable thumbnails and popups.
* Add `n/` to display a video title link inside a sentence.
* Load the video player only after a visitor clicks.
* Store video thumbnails locally and reuse them on later page views.
* Let visitors drag an open popup into floating mode on supported screen sizes.
* Open supported Media Library images in a popup viewer with sequential navigation.
* Override selected items with optional MisticEase Slash Markup.
* Work with the Block Editor, Classic Editor, and Multisite.

== Quick start ==

Block and Classic Editors use the same notation.

Paste a supported video URL into a page or post and publish:

`https://www.youtube.com/watch?v=PASTE_A_REAL_VIDEO_ID_HERE`

MisticEase displays it as a clickable thumbnail that opens in a popup.

To place the video inside a sentence without forcing a thumbnail, add `n/` directly before the URL:

`n/https://www.youtube.com/watch?v=PASTE_A_REAL_VIDEO_ID_HERE`

MisticEase displays the video title as a text link. No other notation is required for normal use.

== Floating mode and images ==

Visitors can drag an open popup into floating mode and keep the media beside the page while reading or following instructions.

On supported desktop and tablet-sized screens, MisticEase can keep one video popup and one Media Library image popup open at the same time.

On smartphone-sized screens, MisticEase uses the normal single-popup behavior.

Media Library images can open in a popup when an image block or text link points to a supported image file in the WordPress uploads directory. Multiple images can be viewed in sequence.

If you already use another gallery plugin, the image popup feature can be turned off in the settings.

== MisticEase Slash Markup ==

Most pages need only a supported URL. Slash Markup is only needed when you want to override the default settings for a specific media item.

It is called Slash Markup because short prefixes are added before the URL and separated by slashes, allowing multiple compatible instructions to be combined.

For example, `p980/` sets the popup width to 980 pixels:

`p980/https://www.youtube.com/watch?v=PASTE_A_REAL_VIDEO_ID_HERE`

Multiple instructions can be combined. For example:

`t300/r30/p980/https://www.youtube.com/watch?v=PASTE_A_REAL_VIDEO_ID_HERE`

This displays a 300-pixel-wide thumbnail with a 30-pixel corner radius and opens the video in a 980-pixel-wide popup.

Slash Markup can control thumbnail width, thumbnail corner radius, popup width, title links, custom labels, captions, image display behavior, and other per-item settings.

Detailed documentation is available in the plugin's settings panel, and the [live demo](https://mitum.me/misticease/) shows it in action.

== Cache and external services ==

When a supported video URL is first displayed, MisticEase stores a physical copy of its thumbnail in the WordPress uploads directory. The local copy is reused on later page views instead of requesting it each time.

The page displays a thumbnail first and loads the video player only after a visitor clicks, helping reduce the performance cost of embedded media.

The maximum cache size can be configured in the settings panel. When the cache limit is reached, older cached thumbnails are removed automatically. A scheduled cleanup also runs once every 30 days.

MisticEase connects to external services when a supported video thumbnail has not yet been cached locally. These requests are used only to retrieve thumbnail images or thumbnail-related metadata for supported video URLs.

The `n/` title-link feature may request provider metadata to resolve the video title when displayed. MisticEase does not create persistent database cache entries for these title-link titles.

When a visitor plays a video, the browser also connects to the original video service for playback.

External services used by supported video features include YouTube, YouTube nocookie playback, Vimeo, and Dailymotion.

Related service and privacy pages:

* YouTube Terms: https://www.youtube.com/t/terms
* YouTube API terms: https://developers.google.com/youtube/terms/api-services-terms-of-service
* YouTube API policies: https://developers.google.com/youtube/terms/developer-policies
* Google Privacy Policy: https://policies.google.com/privacy
* Vimeo legal terms: https://vimeo.com/legal
* Vimeo API terms: https://vimeo.com/legal/service-terms/api
* Vimeo Privacy Policy: https://vimeo.com/privacy
* Dailymotion Terms: https://legal.dailymotion.com/en/terms-of-use/
* Dailymotion Privacy Policy: https://legal.dailymotion.com/en/privacy-policy

== Freemius SDK and optional opt-in ==

MisticEase includes the Freemius SDK for important product notices, MisticEase Arc upgrade and licensing flows, and support-related features.

MisticEase Arc is a substantially expanded premium product in the same series. Because MisticEase and MisticEase Arc share a limited set of media-processing functions, the shared Freemius integration helps prevent both plugins from remaining active at the same time and avoids duplicate processing of the same content.

If you opt in, it also helps the MisticEase developer understand product usage environments and prioritize compatibility and localization work.

Freemius connection is optional. You can use MisticEase without opting in to Freemius.

If you opt in, the information shown in the Freemius opt-in screen is sent to Freemius and managed by Freemius. This information includes your WordPress account username, email address, site URL, product version, plugin status, WordPress version, PHP version, site language, and basic WordPress environment information used for compatibility, updates, licensing, and support-related purposes.

Freemius explains in its Privacy Policy and Data Practices that it does not sell personal data, uses industry-standard practices to keep data secure, and takes appropriate steps to process and store personal data securely in accordance with applicable privacy laws, including GDPR-related rights, California privacy rights, and Brazil’s LGPD.

For details, refer to Freemius:

* Service: https://freemius.com/
* API: https://api.freemius.com/
* Privacy Policy: https://freemius.com/privacy/
* Data Practices: https://freemius.com/privacy/data-practices/
* Terms of Service: https://freemius.com/terms/

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress Plugins screen.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Paste a YouTube, Vimeo, or Dailymotion URL into your content and save.

== Frequently Asked Questions ==

= What video services are supported? =

MisticEase supports common YouTube, Vimeo, and Dailymotion video URLs.

= Where are thumbnails stored? =

Thumbnail images are stored in the WordPress uploads directory. Single-site thumbnails use `/wp-content/uploads/misticease/`; Multisite subsites use folders such as `/wp-content/uploads/sites/2/misticease/`.

= Does this plugin collect personal data? =

MisticEase itself does not collect, store, or analyze personal information. Freemius connection is optional and described in the “Freemius SDK and optional opt-in” section.

= Does this work with Multisite? =

Yes. MisticEase includes network-wide settings for Multisite environments. When a network cache cap is enforced, it applies as the same per-site cache limit for each site.

== Screenshots ==

1. Paste a supported video URL and save the page.
2. The published page displays the video URL as a clickable thumbnail.
3. Click a thumbnail to play the video in a popup.
4. Slash Markup lets you set per-URL thumbnail widths and more.
5. Floating mode can keep one video popup and one Media Library image popup open at the same time.
6. The settings panel includes inline guidance.

== Upgrade Notice ==

= 1.3.0 =
Added `rN/` Slash Markup to set a per-thumbnail corner radius in pixels.

== Changelog ==

= 1.3.0 =

* Added `rN/` Slash Markup to set a per-thumbnail corner radius in pixels.

Older changelog entries are available in `changelog-misticease.txt`.
