=== Pub2Player ===
Contributors: pub2post
Tags: text to speech, audio player, accessibility, listen, narration
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds a "listen to this article" audio player to your blog posts, powered by the Pub2Post service.

== Description ==

Pub2Player turns each of your blog posts into audio. Visitors press play and listen to the article, in their choice of language (English and Spanish for now), and can optionally listen to a short summary instead.

**This plugin is a connector for the Pub2Post / Pub2Player service.** It needs a Pub2Post account and an "Embed ID" from Pub2Player Studio. Audio is generated by the service, using the pages (credits) that come with your Pub2Post plan. See "External services" below for what is sent to the service.

= How it works =

1. Create a player and a website integration in Pub2Player Studio, choosing "Web" as the CMS type.
2. Paste the Embed ID into **Pub2Player → Settings**.
3. Switch the player on for your posts (**Pub2Player → Post Management**, or the Pub2Player box in the post editor).

The plugin reads each post's text from WordPress itself, cleans it, and gives it to the player, so the audio is the same for every visitor and does not depend on your theme's markup.

= Features =

* **Per-post control.** A checkbox in the post editor, and "Enable / Disable Pub2Player" bulk actions plus an enabled/disabled filter on the Posts list.
* **Post Management page.** Enable or disable the player on all posts, or on all posts published before or after a date.
* **New post default.** Choose whether the editor's checkbox starts ticked on new posts.
* **Posts created by code.** Optionally switch the player on for posts created through the WordPress API, importers or automation tools.
* **Player position.** Show the player before or after the post content.
* **Control over what is read.** Choose which shortcodes are read (needed for page builders such as Divi, WPBakery and Avada, which keep article text inside shortcodes), and skip parts of a post by tag, class or ID. The post title and headings are not read.
* **Safe by default.** The player never appears on password-protected or unpublished posts, archives, excerpts, feeds or secondary loops.

== Installation ==

1. Upload the `pub2player` folder to `/wp-content/plugins/`, or install the plugin from the Plugins screen in WordPress.
2. Activate the plugin through the **Plugins** screen.
3. Go to **Pub2Player → Settings** and paste your Embed ID.
4. Go to **Pub2Player → Post Management** and choose "Enable on all posts", or tick **Enable Pub2Player on this post** in the editor of individual posts.

== Frequently Asked Questions ==

= Where do I get an Embed ID? =

In Pub2Player Studio, create a player and a website integration (choose "Web" as the CMS type), then copy the Embed ID from the generated code snippet. The domain you enter in Studio must match this site's address.

= I enabled a post but the player does not appear. =

Check that: an Embed ID is saved; the post is published and not password-protected; the post has readable text (a post with only images, headings or shortcodes that are not allowed has nothing to read); and the Pub2Player box on that post is ticked. If you use a theme or page builder such as Divi and the player still does not appear, turn on **Advanced settings → Third-party themes**.

= The player reads too little, or nothing, on my page-builder site. =

Divi, WPBakery and Avada store article text inside shortcodes. Add those shortcode names (for example `vc_row,vc_column,vc_column_text`) to **Allow shortcodes**. By default no shortcode is read.

= How do I keep part of a post from being read? =

Add the class `pub2player-skip` to any block, or list tags, classes or IDs (for example `blockquote, .share-buttons, #newsletter`) under **Skip HTML tags**.

= Does it work with Elementor? =

Yes. Blog posts built with Elementor's editor are read like any other post. Headings are not read aloud, only body text.

= Does it work on pages or custom post types? =

Not currently. Pub2Player works on blog posts only.

= What happens to my settings when I delete the plugin? =

Deleting the plugin from the Plugins screen removes its settings and the per-post on/off values.

== External services ==

This plugin requires the **Pub2Post / Pub2Player service** (https://www.pub2post.com), which creates and plays the audio. On posts where the player is enabled, the player loads from Pub2Post's server and sends the post's address and text, the chosen language and listening activity to the service. A Pub2Post account and Embed ID are required. By using the plugin you agree to the service's terms:

* Terms of Use: https://www.pub2post.com/termCondition
* Service Terms: https://www.pub2post.com/serviceTerms
* Privacy Policy: https://www.pub2post.com/privacyPolicy

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
