=== Plays Games Widget ===
Contributors: priazu
Tags: games, html5 games, widget, embed, engagement
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.0.12
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add thousands of playable HTML5 games to your WordPress website with a swipeable video feed, Gutenberg block and shortcode.

== Description ==

Plays Games Widget lets publishers add a portrait feed of playable HTML5 games to any WordPress page, post or widget area.

== Features ==

* Infinite swipeable HTML5 games feed
* Thousands of playable HTML5 games
* Gutenberg block
* Shortcode support
* Category filtering
* Responsive design
* White-label embedding
* Adjustable width and height
* Adjustable corner radius
* Lazy loading
* Multiple widgets per page
* Privacy-friendly dashboard with opt-in external preview link

Use either:

* The **Plays Games** block in the block editor.
* The `[pgames_widget]` shortcode.
* Optional shortcode attributes for width, height, category, corner radius and lazy loading.

The plugin reserves the widget dimensions before loading, supports lazy loading and automatically sends the publisher site's domain for aggregate attribution.

= External service =

This plugin displays content provided by **Plays-Games.com** inside an iframe.

The service provides:

* HTML5 game feed
* Preview videos
* Playable games

The widget loads content from:

* `https://plays-games.com/index-white-label.php`

The website hostname is sent in the `pub` parameter to identify the publisher.

The plugin itself does not collect or store visitor personal data in WordPress. When the widget is displayed, the visitor's browser connects directly to Plays-Games.com to load the external feed, and the Plays-Games.com Privacy Policy applies to that connection.

Creating a Plays-Games.com account is optional and is not required to install or use this plugin.

The Plays-Games.com service may display advertisements as part of the game experience, in the same way as when visiting Plays-Games.com directly.

Terms of Use:
https://www.plays-games.com/terms-of-use.php

Privacy Policy:
https://www.plays-games.com/privacy-policy.php

Documentation:
https://plays-games.com/publisher-widget.html


= Source code =

All plugin JavaScript is included in this plugin in human-readable source form. No minified or compiled JavaScript is distributed and no build step is required.

The source files are:

* `assets/admin.js`
* `blocks/plays-games/index.js`

== Installation ==

1. Upload the `plays-games-widget` folder to `/wp-content/plugins/`, or install the ZIP from **Plugins → Add New → Upload Plugin**.
2. Activate **Plays Games Widget**.
3. Open **Plays Games → Widget** and choose your defaults.
4. Add the **Plays Games** block to a page, or insert `[pgames_widget]`.

== Shortcode ==

Basic:

`[pgames_widget]`

Customized:

`[pgames_widget width="100%" height="650" category="arcade" radius="14" lazy="true"]`

Categories

Choose from more than 90 categories directly in the widget settings, including:

* Arcade
* Puzzle
* Action
* Racing
* Sports
* Shooting
* Strategy
* Stickman
* Kids

Leave the category empty to display all games.

== Frequently Asked Questions ==

= Are the games stored in WordPress? =

No. The game feed and playable games are loaded from Plays-Games.com.

= Does the plugin require an account? =

No account is required.

= Can I use more than one widget? =

Yes. You can add multiple blocks or shortcodes to a page.

= How do I remove the widget? =

Remove the block or shortcode, then deactivate and delete the plugin if it is no longer needed.

== Screenshots ==

1. Plays Games settings and privacy-friendly preview panel.
2. Plays Games block controls in the WordPress editor.
3. The widget displayed on a public page.

== Changelog ==

= 2.0.12 =
* Fixed Left / Center / Right alignment on the front end using a dedicated full-width flex alignment wrapper.
* Fixed the Gutenberg Alignment control not appearing by updating the block editor asset version and cache key.


= 2.0.10 =
* Fixed Gutenberg front-end rendering by outputting the dynamic block markup from render.php.
* Uses the same sanitized iframe renderer as the shortcode.


= 2.0.9 =
* Fixed server-side rendering of the Gutenberg block on published pages.
* Kept the editor preview privacy-safe while rendering the live feed on the frontend.

= 2.0.8 =
* Fixed Gutenberg block registration by declaring the WordPress editor script dependencies.
* Moved the block to the standard Widgets inserter category for broad editor compatibility.

= 2.0.7 =
* Renamed the public shortcode to `[pgames_widget]` so it uses the plugin-specific `pgames_` prefix and avoids conflicts.
* Updated documentation and examples to use the new shortcode.

= 2.0.6 =
* Removed automatic external iframes from wp-admin and the block editor.
* External live preview now opens only after an explicit user action.
* Replaced short internal prefixes with the unique `pgames_` / `PGAMES_` prefix.
* Added readable JavaScript source information and updated the contributor metadata.

= 2.0.5 =
* Escaped icon output for WordPress security compliance.
* Added an explicit HTML allow-list for widget iframe output.
* Improved output escaping for inline widget styles.

= 2.0.4 =
* Switched the widget feed to the white-label endpoint.
* Fixed the corner-radius setting in previews, blocks and front-end widgets.
* Removed the New games category.
* Removed the Help and Publisher dashboard cards.
* Added two useful dashboard resource cards.
* Improved full-width rendering.


= 2.0.3 =
* Fixed 100% width on the Dashboard preview.
* Added the full Plays Games category list.

= 2.0.2 =
* Removed the duplicate internal navigation column.
* Fixed 100% width in the live preview.
* Temporarily removed language and autoplay controls.
* Removed the unused Publisher dashboard card.

= 2.0.0 =
* Added a dedicated Plays Games menu and dashboard.
* Added premium live preview and configurator.
* Added Statistics and Documentation sections.
* Improved onboarding and shortcode copy flow.

= 1.0.0 =
* Initial release.
* Added dynamic Gutenberg block.
* Added `[pgames_widget]` shortcode.
* Added settings page and live preview.
