=== glomex oEmbed ===
Tags: oembed, video
Requires at least: 5.3
Tested up to: 6.7.1
Stable tag: 0.9.4
License: Apache-2.0
License URI: https://oss.ninja/apache-2.0-header/glomex
Requires PHP: 7.4

WordPress plugin that acts as a bridge between our oEmbed endpoint and internal WP oEmbed service.

== Description ==

## Description
This is a WordPress plugin that acts as a bridge between our oEmbed endpoint and internal WP oEmbed service. It allows simple oEmbed operation - just paste a link into (basically) any WordPress editor and it will automagically convert this link into glomex player/playlist/integration.

## Installation and operation

Operation simple as follows:

1. Install plugin into WordPress
2. Activate plugin
3. Follow instructions and configure the plugin
4. Forge a URL from template: `https://exchange.glomex.com/[video|videos|playlist|playlists]/VIDEO_OR_PLAYLIST_ID` (integrationId parameter is optional)
5. Go to your post and paste the url into any editor (editor must support oEmbed)
6. You get an embedded player inside content!

This plugin is intended for internal and external usage. There is no dependency on our infrastructure.

## Shortcodes

`[glomex_integration]`
You can use the shortcode `[glomex_integration]` to embed a player in your post.
Additional shortcode parameters (not required):
* `playlist_id` - ID of the playlist to embed
* `integration_id` - override default integration ID
* `variant` - player variant (default: 'player-listicle')
* `width` - player width in pixels (default: responsive width)
* `height` - player height in pixels (default: 16:9 aspect ratio)

Note: All shortcode attributes are properly sanitized for security.
If both width and height are not specified, the player will use responsive sizing with 16:9 aspect ratio.

## URL

The supported url scheme is `https://exchange.glomex.com/[video|videos|playlist|playlists]/VIDEO_OR_PLAYLIST_ID`

The placeholder variables are:
* `VIDEO_OR_PLAYLIST_ID` (mandatory) - the element id to embed
* `[video|videos|playlist|playlists]` (mandatory) - select one item to embed - it should exist in your account and be accessible with the given integration ID

Allowed parameters:

* `integrationId` (optional) - allows overriding integration ID for this single embed
* `includeStructuredData` (optional) - allows overriding structured data inclusion for this single embed

Plugin settings are used by default in all cases. Query strings will override the setting.

## Configuration options

You can set up the default integration ID using the `GLOMEX_INTEGRATION_ID` environment variable.

== Installation ==

= Uploading in WordPress Dashboard =

1. Navigate to the 'Add New' in the plugins dashboard
2. Navigate to the 'Upload' area
3. Select the plugin archive from your computer
4. Click 'Install Now'
5. Activate the plugin in the Plugin dashboard

= Using FTP =

1. Download plugin archive
2. Extract the archive to your computer
3. Upload the plugin directory to the plugins directory (it is usually `/wp-content/plugins/` but sometimes it may vary)
4. Activate the plugin in the Plugin dashboard

== Frequently Asked Questions ==

= Which features do I need on my server? =

You need at least WP 5.3.14, PHP 7.4 and `curl` extension enabled.

= What do I need to operate the plugin? =

You need to configure the plugin. There are only 2 options at the moment - integration ID and structured data configuration.
You need an account at [glomex Exchange](https://exchange.glomex.com).

= Where do I get my integration ID? =

1. You need to navigate to your account at [glomex Exchange](https://exchange.glomex.com).
2. Go to `Manage => Players`
3. Select one and copy `Configuration ID`
4. Paste the ID into the field on site or use to forge a link

= Can I use more than one integration ID on the site? =

Yes you can. You can have one "basic" integration ID in your plugin configuration and any amount of integration IDs
for embedded player.

= What is a Structured data? =

Structured data allows you to have more search-engine friendly site. In case of our plugin this means that results from
your site may appear as "Video" in Google search results. We provide a JSON-LD structured data for you. Read more on
[JSON-LD](https://json-ld.org/).

== Changelog ==

= 0.9.4 =
* improved security by adding proper escaping for shortcode attributes

= 0.9.3 =
* improved code quality to align with WordPress Coding Standards.
* improved security by adding proper sanitize for shortcode attributes

= 0.9.2 =
* improved security by adding proper escaping for shortcode attributes
* updated/tested with WP 6.7.1

= 0.9.1 =
* created `glomex_integration` shortcode to embed a player in your post

= 0.9.0 =
* created functionality for the prefixing video ID in the URL
* updated/tested with WP 6.4.3

= 0.8.5 =
* updated vendor requirements

= 0.8.4 =
* removed internal update checker
* renamed functions/namespaces/constants names with new prefix

= 0.8.3 =
* updated vendor requirements

= 0.8.2 =
* fixed the problem with embedding URL decoding in popular page builders

= 0.8.1 =
* fixed the problem with embedding URL decoding in older WP versions

= 0.8 =
* fix files headers
* fix grumphp config
* refactor main oEmbed code to be better quality
* implement custom codestyle based on CodeatCS

= 0.7 =
* Use 2 different vendor directories and composer files

= 0.6 =
* Load only single `glomex-player.js` on frontend

= 0.5.5 =
* Bugfix in oEmbed URL generation function

= 0.5.4 =
* Update documentation

= 0.5.3 =
* Implemented update checker with support for Github repo

= 0.5.0 =
* Initial release with basic functions

== Upgrade Notice ==

= 0.5.4 =
* Update documentation
