=== Pepvote ===
Contributors: pepvote
Tags: voting, election, awards, ballot, embed
Requires at least: 6.4
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

Embed Pepvote voting, registration, and result pages in your posts and pages.

== Description ==

[Pepvote](https://pepvote.com) is an online voting platform for elections, polls, awards, and referendums. This plugin puts your Pepvote voting event on your WordPress site, so voters can register, vote, confirm their votes, and see results without leaving your site.

Add the **Pepvote** block, or use the `[pepvote]` shortcode in the classic editor. You can embed any public page of a voting event:

* Main voting page
* Candidate registration
* Voter registration (elections only)
* Ballot preview
* Cast votes
* Confirm votes
* Results

The embed fits its height to the Pepvote page, so visitors never see a second scrollbar. You can turn this off and set a fixed height instead.

Step-by-step help with screenshots: [Pepvote WordPress plugin guide](https://support.pepvote.com/integrations/wordpress-plugin).

= Shortcode =

`[pepvote code="ENWPH8799"]`

Options:

* `code` (required): the voting event code, or a Pepvote link that contains one.
* `page`: `voting` (default), `candidate-registration`, `voter-registration`, `ballot`, `cast`, `confirm`, or `result`.
* `height`: the height in pixels, from 200 to 4000. Default 560. With auto height on, this is the starting height.
* `auto_height`: `true` (default) or `false`.
* `title`: the accessible title that screen readers announce for the embed.

Example: `[pepvote code="ENWPH8799" page="result" height="640" auto_height="false"]`

= Block =

Search for "Pepvote" in the block inserter. Enter the voting event code, or paste a link from the Share url in your Pepvote dashboard. Choose the page and height in the block settings.

You can also paste a Pepvote link on its own line, or paste a `[pepvote]` shortcode, and the editor turns it into a Pepvote block.

= External service =

This plugin loads pages from Pepvote (https://pepvote.com) in an iframe. It sends no data to Pepvote from your WordPress server. When a visitor views a page with an embed, their browser loads the Pepvote page directly, and Pepvote receives the usual request data, such as the visitor's IP address and browser details. Anything the visitor enters in the embed, such as a voter registration or a vote, goes to Pepvote.

* Terms of Service: https://pepvote.com/legal/terms
* Privacy Policy: https://pepvote.com/legal/privacy

== Frequently Asked Questions ==

= Where do I find my voting event code? =

In your Pepvote dashboard, open the voting event. The code is on the overview page, for example `ENWPH8799`.

= Why does the registration embed say registration is closed? =

Public registration pages only show a form while that registration is turned on and open. Check the Public Registration settings of your voting event in Pepvote.

= Can I point the plugin at another Pepvote environment? =

Yes. Add `define( 'PEPVOTE_BASE_URL', 'https://your-pepvote-url' );` to `wp-config.php`, or use the `pepvote_base_url` filter.

== Screenshots ==

1. The Pepvote block in the editor with its settings.
2. A voting page embedded at full width.
3. Live results embedded on a page.

== Changelog ==

= 1.0.0 =
* First release: the Pepvote block and the `[pepvote]` shortcode for every public voting event page, with auto height.
