=== Adhano Prayer Times ===
Contributors: yazanmy
Tags: prayer times, salah, mosque, iqama, islam
Requires at least: 6.3
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

Prayer times and iqama for your mosque or city, with a live countdown. Shortcode, block and widget. English and Arabic.

== Description ==

Show today's prayer times on your WordPress site, for a mosque or for a city.

* **Mosque profile.** Paste your mosque's link from [Adhano](https://prayer.yazanmy.com). Its iqama times, Jumu'ah time, calculation method and announcements show on your site, and edits you make on Adhano appear within 15 minutes.
* **City.** Or pick a city, such as `amman`, `cairo` or `istanbul`. The calculation method follows the country, or choose the method, the Asr school (Hanafi or the standard) and minute adjustments yourself.
* **Four layouts.** Table, card, compact (one line, good for sidebars) and a month timetable.
* **Next prayer.** A live countdown to the next prayer, and the next row highlighted.
* **Arabic and English.** Right-to-left layout, Arabic prayer names and dates. Each display can follow the site language or be set on its own.
* **Fits your theme.** Uses your theme's font and colours, or the Adhano palette (teal and gold), following the visitor's light or dark mode or fixed to one. Pick your own accent, text and background colours, corner radius and text size, or add custom CSS.
* **More times.** Hide sunrise, or add midnight and the last third of the night.
* **Light.** No jQuery. The small script and stylesheet load only on pages that show prayer times. Times are cached on your server, so visitors never contact Adhano.

Use the **Prayer Times (Adhano)** block, the **Prayer Times (Adhano)** widget, or the shortcode:

`[adhano]` uses the settings.
`[adhano city="amman" layout="card"]`
`[adhano mosque="https://prayer.yazanmy.com/mosque?id=abc2345" lang="ar"]`

Shortcode attributes:

* `mosque`: the mosque's Adhano link or its 7-character id. Takes precedence over `city`.
* `city`: a city in English or Arabic.
* `layout`: `table`, `card`, `compact` or `month`.
* `lang`: `en`, `ar` or `auto` (the site language).
* `show`: any of `iqama`, `jumuah`, `hijri`, `next`, `announcements`, `night`, separated by commas, or `none`.
* `clock`: `auto` (Arabic 24-hour, English 12-hour), `24h` or `12h`.
* `colors`: `theme`, `adhano`, `light` or `dark`.
* `sunrise`: `yes` or `no`.

Empty attributes use Settings, Adhano.

== External services ==

This plugin gets prayer times from the Adhano API at https://prayer.yazanmy.com, a free service run by the plugin's author. It is needed for the plugin to work: prayer times, iqama, Hijri dates and mosque announcements all come from it.

* **What is sent, and when:** when a page with prayer times is viewed and no cached copy is available, your server requests `https://prayer.yazanmy.com/api/v1/calendar` with the chosen city name (or the mosque's coordinates and time zone), the language and the mosque's calculation and iqama settings. With a mosque profile it also requests `https://prayer.yazanmy.com/api/profiles/<id>`. Responses are cached until midnight in the place's time zone (at most 12 hours; mosque profiles for 15 minutes).
* **What is not sent:** nothing about your visitors. Requests come from your server, not from visitors' browsers, and carry no cookies, user data or site address. No API key or account is needed. The plugin does no tracking.
* Terms and privacy: [Privacy policy](https://prayer.yazanmy.com/privacy). API documentation: https://prayer.yazanmy.com/docs

== Installation ==

1. Install and activate the plugin.
2. Go to Settings, Adhano. Paste your mosque's link, or type a city.
3. Add the Prayer Times (Adhano) block, the widget, or the `[adhano]` shortcode to any page.

No mosque profile yet? Create one for free at https://prayer.yazanmy.com/mosque/manage. You choose the iqama times, Jumu'ah time and announcements there, and the same profile drives mosque screens, phone pages and this plugin.

== Frequently Asked Questions ==

= Where do the times come from? =

From the Adhano API. The plugin does not calculate anything itself, so the times match the Adhano website, apps and mosque screens exactly.

= Which calculation method is used? =

For a city, the authority used in that country (for example Jordan's Awqaf, Umm al-Qura in Saudi Arabia, the Egyptian authority in Egypt), unless you choose another method, Asr school or minute adjustments under Calculation in the settings. For a mosque profile, the method the mosque chose.

= I changed the iqama on Adhano. When does my site show it? =

Within 15 minutes. To see it at once, use Clear cache in Settings, Adhano. If you use a page cache plugin, clear that too.

= What happens when Adhano cannot be reached? =

The plugin shows the last times it saved, and tries again a few minutes later. Editors see a short note; visitors do not.

= Can I change the colours? =

Yes, under Appearance in the settings: follow the theme or use the Adhano palette (with the visitor's light or dark mode, or always light or dark), then set your own accent, text and background colours, corner radius and text size. The Custom CSS box takes any other rule, such as `.adhano-title { font-size: 1.5em; }`; the CSS variables, such as `--adhano-accent`, also work from your theme.

= Does it work with page caching? =

Yes. The countdown and the next-prayer highlight run in the browser from the times on the page, so a cached page stays correct during the day.

== Screenshots ==

1. Table layout, English.
2. Card layout, Arabic.
3. Settings, Adhano.

== Changelog ==

= 1.0.0 =
* First release: shortcode, block and widget; table, card, compact and month layouts; mosque profiles with iqama, Jumu'ah and announcements; live countdown; English and Arabic.
* Appearance settings: theme colours or the Adhano palette (with the visitor's light or dark mode, or always light or dark), accent, text and background colours, corner radius, text size and custom CSS.
* Calculation settings for cities: method, Asr school (Hanafi) and minute adjustments per prayer.
* Hide sunrise, and show midnight and the last third of the night.
* Clock follows the language by default (Arabic 24-hour, English 12-hour).

== Upgrade Notice ==

= 1.0.0 =
First release.
