=== Din - Muslim Prayer Timetable ===
Contributors: wansaifudin
Donate link: https://buymeacoffee.com/wansaifudin
Tags: prayer times, mosque, islamic, hijri, muslim
Requires at least: 5.8
Tested up to: 7.1
Stable tag: 1.2.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Simple, modern prayer timetable for mosques. Display via shortcode with Hijri date support, countdown timer, styling, and PDF download.

== Description ==

Din is a lightweight, modern WordPress plugin designed to display daily and monthly Islamic prayer times. It allows mosques and Islamic centers to easily share accurate prayer timetables on their websites through simple shortcodes.

= Features =

* Daily prayer times in vertical or horizontal layout
* Next prayer with live countdown timer
* Monthly prayer timetables
* Simple Hijri (Islamic) date with manual month/day override
* Customizable colors, font size, and styling
* CSV import for easy bulk upload
* Responsive design with modern CSS
* Automatic next prayer highlighting
* Cache-busted asset loading
* PDF download of prayer timetable (via uploaded PDF)
* Fully translation-ready (i18n)

= How It Works =

1. Import your prayer times via CSV (sample provided)
2. Display using shortcodes: `[dinmpt_daily_timetable]`, `[dinmpt_next_prayer]`, `[dinmpt_monthly_timetable]`, `[dinmpt_hijri_date]`
3. Customize appearance via the Design settings tab
4. Configure Hijri date settings using the base date and monthly day overrides

== Installation ==

1. Upload the `din-muslim-prayer-timetable` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to Settings > Prayer Times to import your CSV file
4. Use the shortcodes to display prayer times on any page or post

== Frequently Asked Questions ==

= What shortcodes are available? =

* `[dinmpt_daily_timetable]` - Display daily prayer times table
* `[dinmpt_next_prayer]` - Display next prayer with countdown timer
* `[dinmpt_monthly_timetable]` - Display monthly prayer times
* `[dinmpt_hijri_date]` - Display today's Hijri date
* `[dinmpt_gregorian_date]` - Display today's Gregorian date

= How do I import prayer times? =

Download the sample CSV file from the plugin's Import tab, fill in your prayer times, and upload it through the same tab.

= How does the Hijri date work? =

The plugin uses a simple anchor-based calculation. Set the base Gregorian date and corresponding Hijri date, then manually override each month's length (29 or 30 days). The system automatically updates as days pass.

= Can I customize the appearance? =

Yes, you can customize colors, font sizes, and other styling options through the Design settings tab.

== Screenshots ==

1. Daily prayer times table with Hijri date
2. Next prayer countdown timer
3. Monthly prayer timetable
4. Admin settings page with Hijri configuration
5. CSV import interface
6. Design customization options

=== Changelog ==

= 1.2.2 =
* Fixed PHP 7.4 parse error: removed PHP 8.0 union type `string|false` return declarations from parseDate() methods in class-dinmpt-csv-processor.php and class-dinmpt-renderer.php

= 1.2.1 =
* Fixed mixed line endings across all PHP, JS, and CSS files to resolve Plugin Check Internal.LineEndings.Mixed warnings
* Prefixed all local variables in View template files (hijri-tab.php, design-tab.php) to comply with WordPress.NamingConventions.PrefixAllGlobals

= 1.2.0 =
* Renamed all prefixes from dpt_/DPT_ (3-char) to dinmpt_/DINMPT_ (6-char) to comply with WordPress.org plugin guidelines (minimum 4-character prefix)
* Renamed all include files from class-dpt-*.php to class-dinmpt-*.php
* Renamed all CSS classes and variables from dptt-* to dinmpt-*
* Renamed all asset handles from dptt-* to dinmpt-*
* Renamed JS variables from DPTT/dptt_vars to DINMPT/dinmpt_vars
* Fixed sanitizeHijriSettings() to validate base Gregorian date using DateTime::createFromFormat (prevents DateTime exceptions on invalid calendar dates)
* Note: Due to prefix change, existing settings will need to be reconfigured

See changelog.txt for older version history.

== Upgrade Notice ==

= 1.2.2 =
Critical: Fixes PHP 7.4 parse error on activation. Update required if your site runs PHP 7.4.

= 1.2.1 =
Fixed mixed line endings and non-prefixed variable names in template files.

= 1.2.0 =
Important: Plugin prefix renamed from dpt to dinmpt for WordPress.org compliance. Due to this change, existing settings will need to be reconfigured after update.

= 1.1.3 =
Plugin Check compliance: added phpcs:ignore annotations for custom table direct queries, added caching to year/distinct-year queries with proper cache invalidation, fixed unsanitized $_GET in AJAX handler.

= 1.1.2 =
Security and compliance fixes: text domain alignment, output escaping, nonce verification annotations.

= 1.1.0 =
Important: Plugin renamed for trademark compliance. All settings and data will migrate automatically. Key fixes include nonce sanitization, menu placement, and activation stability improvements.

== License ==

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/gpl-2.0.html>.

== Developer Notes ==

Developed by Wan Saifudin (https://wansazlinasaruddin.com). This plugin is free for use on any WordPress site. No warranties are provided.