Shorts Video Embedder for YouTube
Contributors: whatsonagency
Donate link: https://buymeacoffee.com/armanh522b
Tags: YouTube, responsive, embed, video, gallery
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.0
Stable tag: 1.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A plugin to embed and display YouTube Shorts from a channel via a shortcode.

== Description ==
A versatile WordPress plugin by WhatsOn that enables you to fetch and display YouTube Shorts from a specified channel, with customizable video settings for both desktop and mobile devices.

= Features =
* Embed YouTube Shorts from any channel using a shortcode.
* Configure video dimensions and display settings independently for desktop and mobile.
* Limit the number of videos shown for both desktop and mobile devices.
* Customize the layout with items per row, video width, and height settings.
* Fully responsive and mobile-friendly.

**Usage**: Place the `[youtube_shorts]` shortcode on any page or post to display the YouTube Shorts gallery.

== Installation ==

1. Download the plugin as a ZIP file.
2. In your WordPress dashboard, go to **Plugins > Add New** and select **Upload Plugin**.
3. Upload the ZIP file, activate the plugin, and go to **Settings > YouTube Shorts** to configure the options.

== Frequently Asked Questions ==

= How do I get a YouTube API Key and Channel ID? =

To use the plugin, you’ll need a **YouTube API Key** and your **YouTube Channel ID**.

**Step 1: Get a YouTube API Key**

1. Visit the [Google Cloud Console](https://console.cloud.google.com/).
2. Log in with your Google account or create one if needed.
3. Create a new project or select an existing one.
4. Go to **APIs & Services > Library** in the sidebar.
5. Search for **YouTube Data API v3** and enable it.
6. Go to **APIs & Services > Credentials** and select **Create Credentials**.
7. Choose **API key** and copy it into the **Settings > YouTube API Key** field.

**Step 2: Find Your YouTube Channel ID**

1. Visit [YouTube](https://www.youtube.com/) and sign in.
2. Click your profile icon and select **Your Channel**.
3. Your **Channel ID** is in the URL as the part following `/channel/`.

Paste the Channel ID in the **Channel ID** field in the plugin settings.

= Can I customize the layout for different devices? =

Yes, you can adjust the **Max Results**, **Items per Row**, and **Video Width and Height** for desktop and mobile separately. Use the plugin settings page to configure these options.

== External Services ==

This plugin uses the YouTube Data API v3 to fetch and display YouTube Shorts videos from a specified channel.

**What data is sent and when:**
- When a user enables the plugin and configures their API Key and Channel ID, the plugin sends the following data to the YouTube API:
  - API Key: Required to authenticate requests.
  - Channel ID: Used to identify which channel's videos to fetch.
  - Max Results: Specifies the number of videos to retrieve.
  - Request Type: Specifies that only videos are being fetched.

**Why this data is sent:**
- The data is sent to fetch public video data (title, description, thumbnail, and video URL) from the YouTube channel specified by the user.

**Terms and Privacy Policy:**
- By using this plugin, users must comply with YouTube’s Terms of Service and Privacy Policy:
  - [YouTube Terms of Service](https://www.youtube.com/t/terms)
  - [Google Privacy Policy](https://policies.google.com/privacy)

The plugin does not store or share this data with any other third-party services.

== Screenshots ==

1. **Plugin Settings Page** - Configure your API Key, Channel ID, and display settings.
2. **Embedded YouTube Shorts Gallery** - Displayed using the shortcode `[youtube_shorts]`.

== Changelog ==

= 1.8 = 
* Added Video Layout Style, Grid, List, Masonry View
* Added Custom CSS Option
* Added Shorts Video Filter, Title, Random, Date, View
* Added Filter Keyword By

= 1.7 =
* Added support for setting different Max Results, Items per Row, Width, and Height for mobile.

= 1.6 =
* Fixed CSS rendering issues for mobile displays.

= 1.5 =
* Updated API request handling.
* Improved error handling for API requests.

= 1.4 =
* Initial release with YouTube Shorts embed functionality.

== Upgrade Notice ==

= 1.7 =
This update allows for customized display options on mobile devices, such as different Max Results and layout settings.

== License ==

This plugin is licensed under the GPLv2 or later. See the `LICENSE.txt` file for details.

Copyright (C) 2024 WhatsOn  
Website: [https://whatson.agency/](https://whatson.agency/) | [https://whatson.guide/](https://whatson.guide/)

== Support ==

For support, please contact WhatsOn support at [support@whatson.agency](mailto:support@whatson.agency).
