=== Unlock-To-View ===
Contributors: zzraz
Donate link: https://www.paypal.com/donate/?hosted_button_id=4SMV5H3BFFJKQ
Tags: rent video, unlock to view, pay per view, monetize, code to unlock
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Unlock-To-View lets you lock videos using shortcodes. Perfect for monetizing and securing content.

== Description ==

Unlock-To-View is a lightweight plugin for WordPress that lets you restrict access to videos using an unlock code. No registration needed, the viewer simply adds their email, gets a code and unlock. Pay afterwards (optional)! Support video players YouTube, Vimeo, Presto Player, or direct video URLs.

**Key Features:**
* Lock any video with a simple shortcode.
* Fixed price and duration for all rentals
* Supports multiple video players (YouTube, Vimeo, Presto Player, or direct URLs).
* Easy-to-use shortcode generator in the admin panel.
* All shortcodes are stored in a log
* Full rental log with email, slug, media, expiration and IP.
* Easily send email reminders for expired payments 
* A mark as paid button to show if a rental is paid.
* CSV export of all shortcodes and rentals.
* Customizable unlock button text.
* No third party integration

**Planned Features (coming soon in Pro version):**
* Full customization of the unlock/rental button.
* Fixed or individual price and duration for rentals
* Support for additional video players.
* Styling options directly in the admin panel.

**How it works:**
1. Embed a video on any page or post.
2. Use the Unlock-To-View shortcode
3. Users unlock the video by adding their email address
4. All rentals are logged using email, slug, expiry date and code  
== External services ==

This plugin may connect to the following external services:

1. **Vimeo (player.vimeo.com)**  
   - **Purpose**: To display embedded videos using Vimeo’s video player.  
   - **What is sent**: When a video is displayed, the visitor’s browser requests the video from Vimeo’s servers. This includes the video ID and standard browser request information (such as IP address and user agent).  
   - **When**: Only when a page containing a Vimeo video shortcode is viewed.  
   - **Terms of Service**: https://vimeo.com/terms  
   - **Privacy Policy**: https://vimeo.com/privacy

2. **liserasmussen.se**  
   - **Purpose**: The plugin includes a link to the developer’s website to provide documentation and help users build shortcodes. This is for informational purposes only.  
   - **What is sent**: No data is sent automatically. When a user clicks the link, it simply opens in their browser like a regular hyperlink.  
   - **When**: Only if the user manually clicks the link in the plugin interface.  
   - **Terms of Service**: https://liserasmussen.se/unlock-to-view/terms.html  
   - **Privacy Policy**: https://liserasmussen.se/unlock-to-view/privacy.html


== Demo Video ==

Watch a tutorial on how to use Unlock-To-View:  
👉 [Watch the full demo on YouTube](https://www.youtube.com/watch?v=ccbgOlbsec8)

[![Unlock-To-View Demo](https://liserasmussen.se/unlock-to-view/Unlocktoview_demo.png)](https://www.youtube.com/watch?v=ccbgOlbsec8)

== Installation ==

1. Download the zip file
2. Upload the zipped file from the Plugins menu in WordPress.
3. Activate the plugin.
4. Go to the Unlock-To-View settings page to configure pricing, emails, and rental options.
5. Use the shortcode generator to create shortcodes for your videos.

== Frequently Asked Questions ==

= Can I use any video player? =
Not in the free version. You can choose between Presto Player, Vimeo, YouTube, or a direct video URL.

= How do I set the rental duration? =
Go to Settings → General Settings → Duration (hours) to set how long a rental lasts. In the free version there is one duration for all rentals. In the upcoming paid version you can set this individually per shortcode.

= How do I set the rental price? =
Go to Settings → General Settings → Price to set the price for rentals. In the free version there is one price for all rentals. In the upcoming paid version you can set this individually per shortcode.

= Can I customize the unlock button text? =
Yes. In Settings → General Settings → Button Label, you can customize the text users see.

= Can I export my rental log? =
Yes. Use the “Export to CSV” button on the admin page.

== Screenshots ==

1. Shortcode Generator interface.
2. Rentals log with email reminders.
3. Settings page for pricing and email templates.

== Changelog ==

= 1.0.0 =
* Initial release.
* Added support for multiple video players.
* Shortcode generator added.
* Rental log with email reminders.
* CSV export for rentals.
* Customizable unlock button text.

== Upgrade Notice ==

= 1.0.0 =
Initial release of Unlock-To-View. No upgrade actions needed.

== License ==

This plugin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
