=== PrayTime.me Bible Verses ===
Contributors: m1sh0u
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.3
Donate link: https://whydonate.com/fundraising/praytimeme-bible-verses-wordpress-plugin
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Thirteen public-domain English Bible translations, displayed anywhere with the [praytime_bible_verses] shortcode.

== Description ==

We recently launched the website [PrayTime.me](https://praytime.me) with the aim of creating a community for believers and those seeking spiritual peace.

Wishing to make the [Bible](https://praytime.me/bible/) available directly on our website for free — and finding no viable way to do so using existing tools or plugins — we decided to develop this plugin to distribute at no cost to anyone running a site on this platform. 

= Credit =

Although the plugin is free, we kindly ask you to enable the **CREDIT checkbox** which is found in **Settings**, in order to recognize our effort to make this plugin available for free.

= Donate =

We thank you for your [**donation**](https://whydonate.com/fundraising/praytimeme-bible-verses-wordpress-plugin) and wish you great success in your mission to share the Bible with everyone, free of charge.

== Bible usage rights ==

| Translation | Usage rights |
|---|---|
| **BSB** | Dedicated to the public domain on April 30, 2023. [Publisher’s statement](https://berean.bible/licensing.htm) |
| **ASV** | Original 1901 text is public domain. [Distribution notice](https://ebible.org/find/show.php?id=eng-asv) |
| **AKJV** | American King James Version was dedicated to the public domain, allowing copying, selling and modifying. [Dedication](https://www.stepbible.org/version.jsp?version=AKJV) |
| **CPDV** | SacredBible states its text and files are public domain unless otherwise indicated. [Original source](https://sacredbible.org/) |
| **DBT** | Historical Darby text is public domain. [Distribution notice](https://ebible.org/find/show.php?id=engDBY) |
| **DRB** | Historical Douay-Rheims/Challoner text is public domain. [Distribution notice](https://www.crosswire.org/sword/modules/ModInfo.jsp?modName=DRC) |
| **ERV** | Historical **English Revised Version** is public domain; confirm the exact edition because other translations share that abbreviation. |
| **JPS / WEY** | **JPS 1917** is public domain; historical Weymouth editions are public domain in the US. Later JPS translations have different rights. [JPS explanation](https://jps.org/resources/tanakh-customer-guide/), [Weymouth example](https://gutenberg.org/ebooks/8844) |
| **NHEB** | Published as a public-domain translation. [Publisher’s foreword](https://nheb.net/files/NHEB.pdf) |
| **SLT** | Julia E. Smith’s historical translation is public domain; verify the dataset contains that text. |
| **WBT** | Webster’s historical translation is public domain. [Distribution notice](https://www.crosswire.org/sword/modules/ModInfo.jsp?modName=Webster) |
| **WEB** | Text is public domain, but **“World English Bible” is a trademark**; the publisher asks that modified text use another name. [Publisher’s terms](https://ebible.org/details.php?id=eng-web) |
| **YLT** | Historical Young’s Literal Translation is public domain. [Distribution notice](https://ebible.org/engylt/copyright.htm) |

== Installation ==

This section describes how to install the plugin and get it working.

1. You can install the plugin by **uploading** the **.zip** file in the **plugins section** of Wordpress, or by adding the files to the folder `/wp-content/plugins/praytime-me-bible-verses`.
2. **Activate** the plugin through the `Plugins` menu in WordPress.
   
   On activation the plugin creates three tables (wp_praybive_bibles, wp_praybive_books, wp_praybive_verses, using your table prefix) and imports the bundled SQL (data/bibles-data.txt) into them: 13 translations, 66 books and about 405,000 verses.

   The import is too large for a single request, so it runs in short batches in the background (WP-Cron). Progress is shown under `Tools → PrayTime.me Bible Verses`, where an administrator can also run it in the browser. On sites where WP-Cron is disabled, use the button there or run `wp praytime-me-bible-verses import`.
3. Make sure the plugin **data was successfully imported**. To check that, you must go to the plugin settings `Tools → PrayTime.me Bible Verses → Settings` in the **Import & usage** tab. If the import was not done automatically, simply press the **Run import now** button to import the needed data for the plugin to work properly.
4. **Create or Edit a page/post** where you want to display the Bible. Inside the page/post body add the `/Shortcode` `[praytime_bible_verses]`.
5. **Visit** your new/edited page/post to see the newly added Bible.
6. Check the plugin **settings** for multiple render capabilities. To access the Settings page follow the path `Tools → PrayTime.me Bible Verses → Settings`

= Demo =

You can see a live demo on our website on the [Bible](https://praytime.me/bible/) page or in the [Wordpress Playground](https://playground.wordpress.net/?plugin=praytime-me-bible-verses)

= Usage =

The following `/Shortcodes` can be used to display different kind of verses, or chapters of the Bible Translations

* `[praytime_bible_verses]` — a reader with translation, book and chapter pickers and previous/next chapter links.
* `[praytime_bible_verses reference="John 3:16"]` — a single verse in the default translation (BSB unless changed in the settings).
* `[praytime_bible_verses reference="Psalm 23" bible="WEB"]` — a whole chapter.
* `[praytime_bible_verses reference="Romans 8:28-30" bible="WEB,YLT,ASV"]` — translations side by side.
* `[praytime_bible_verses reference="Genesis 1:1" bible="all"]` — every translation.
* `[praytime_bible_verses book="John" chapter="1" verses="1-5"]` — the same as reference, as separate attributes.
* `[praytime_bible_verses reference="John 1" browse="yes"]` — the reader, opened at a chosen chapter.
* `[praytime_verse_of_the_day]` — a verse that changes every day; also accepts `bible` and `show_info`.
* `show_info="no"` / `show_info="yes"` — hides or shows the translation descriptions, overriding the setting.

Translations (`bible="…"`): BSB, ASV, AKJV, CPDV, DBT, DRB, ERV, JPS / WEY, NHEB, SLT, WBT, WEB, YLT.

= For developers: verse provider API =

Other plugins (for example a bridge that posts a daily verse to a community plugin) can read verses as structured data through three filters. They are read-only: nothing is rendered, saved or scheduled. Pass `null` as the value, so the result stays `null` when this plugin is not active.

1. Method definition: `apply_filters( 'praybive_get_verse', null, $args )` — a passage. `$args`:

   * `reference` (required) — `John 3:16`, `John 3:16-18` or `Psalm 23`.
   * `translation` — a code such as `WEB`; empty means the default translation. Must be enabled in the settings.
   * `max_verses` — refuse longer passages (`0`, the default, means no limit). Useful for user-typed commands.

2. Method definition: `apply_filters( 'praybive_get_verse_of_the_day', null, $args )` — the verse the `[praytime_verse_of_the_day]` shortcode shows for a date, following its settings. `$args`:

   * `date` — `Y-m-d`; empty means today in `timezone`.
   * `timezone` — a PHP timezone such as `Europe/Bucharest`; empty means the site timezone.
   * `translation` — empty means the verse of the day translation.

Both return either a `WP_Error` or this array (`date` only for the verse of the day):

`array(
    'api_version' => 1,
    'reference'   => 'John 3:16-17',
    'book'        => 'John',
    'chapter'     => 3,
    'verse_start' => 16,
    'verse_end'   => 17,
    'text'        => 'For God so loved the world, … For God sent not his Son …',
    'verses'      => array( array( 'number' => 16, 'text' => '…' ), array( 'number' => 17, 'text' => '…' ) ),
    'translation' => 'WEB',
    'attribution' => 'World English Bible - https://worldenglish.bible/',
    'url'         => 'https://example.com/bible/?praybive_bible=web&praybive_book=43&praybive_chapter=3',
    'hash'        => 'md5 of translation, reference and text',
    'date'        => '2026-10-09',
)`

* `attribution` is the translation's credit line; show it next to the text.
* `url` links to the chapter on the reader page chosen in the settings, or is empty when none is chosen.
* `hash` is stable for the same translation, reference and text, so it can be stored to avoid posting a verse twice.

Error codes: `praybive_not_ready` (the import has not finished), `praybive_unknown_translation`, `praybive_invalid_reference`, `praybive_not_found`, `praybive_too_long`, `praybive_invalid_date`, `praybive_invalid_timezone`.

3. Method definition: `apply_filters( 'praybive_get_translations', null )` lists the enabled translations as `array( 'code' => 'WEB', 'attribution' => '…', 'is_default' => true )` items, for a settings screen. It is empty until the import has finished.

The `praybive_api_loaded` action fires on `plugins_loaded` with the API version (`1`). The version only changes if the returned arrays change in a way that could break callers.

== Settings ==

**Tools** → **PrayTime.me Bible Verses** → **Settings** holds the site-wide defaults; `/Shortcode` attributes override them.

* Translations: the default translation, which translations are enabled, whether translation descriptions are shown, and the chapter the reader opens at.
* Appearance: accent colour, light / dark / automatic colour scheme, flowing or one-verse-per-line text, verse numbers, and stacked or side-by-side columns when comparing up to three translations.
* Verse of the day: rotate through an editable list of references, or pick a random verse each day.
* Reader links: addresses like /bible/web/john/3/ on a chosen reader page (needs a non-plain permalink structure).
* Sharing: Copy and Share buttons on passages, with click-to-copy verse numbers.
* Credit: an optional "This plugin is freely offered by PrayTime.me" line linking to [PrayTime.me](https://praytime.me/). It is off until the site owner enables it.
* Data: keep the Bible texts and settings when the plugin is deleted.

== Screenshots ==

1. How to insert the Shortcode into the page editor
2. Main look and feel of the plugin
3. Bible Translation selector
4. Import & Usage information
5. Settings - Screenshot 1
6. Settings - Screenshot 2

== Changelog ==

= 1.0.0 =
First release

= 1.0.1 =
Updated readme file by adding Changelog and the Installation tab

= 1.0.2 =
Added a screenshot about how to install the plugin in the page editor

= 1.0.3 - 1.0.5 =
Small readme changes for better understanding of the plugin

= 1.1.0 =
Added the developers API for other plugins to be able to read verses as structured data through three filters

= 1.1.1 =
* Removed KJV Translation, since it is protected in UK by copyright law
* Added bible usage rights

= 1.1.2 =
* Added the possibility to increase/decrease the font size
* Added a button to see the bible on fullscreen

= 1.1.3 =
Fixed readme file

== Uninstall ==

Deleting the plugin from the Plugins screen drops its three tables and its settings, unless "Keep the Bible texts and settings" is enabled in the settings. Deactivating always keeps them.
