=== BaKhabar Gold Rates ===
Contributors: muhammadawaisrashid
Tags: gold rate, gold price, pakistan, gold rates pakistan, 24k gold, 22k gold
Requires at least: 5.0
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display live Pakistan gold rates (24K, 22K, 21K per tola) on your WordPress site. Verified against SBP by BaKhabar Pakistan.

== Description ==

Show today's verified gold rates on your WordPress site with a clean, lightweight widget. Rates are fetched from BaKhabar Pakistan's verified data pipeline — cross-checked against APGJSA (Sarafa Association) and the State Bank of Pakistan.

**Features:**
* Live 24K, 22K, 21K gold rates per tola
* Light and dark theme options
* Sidebar widget + shortcode support
* Optional attribution credit link (off by default)
* 15-minute smart caching (no API overload)
* Graceful fallback if API is temporarily unavailable
* Responsive design
* Zero configuration required — just activate and use

**Usage:**

As a shortcode in any post or page:
`[bakhabar_gold]`

With options:
`[bakhabar_gold theme="dark" show_22k="yes" show_21k="no" show_credit="yes"]`

As a widget: Go to Appearance → Widgets → add "BaKhabar Gold Rates" to any sidebar.

== Installation ==

1. Download the plugin zip file
2. Go to WordPress Admin → Plugins → Add New → Upload Plugin
3. Upload the zip file and click "Install Now"
4. Activate the plugin
5. Use the shortcode `[bakhabar_gold]` or add the widget from Appearance → Widgets

== Frequently Asked Questions ==

= Where does the data come from? =
Gold rates are fetched from BaKhabar Pakistan (bakhabarpakistan.com), which verifies rates against APGJSA and the State Bank of Pakistan's M2M exchange rate.

= How often does the data update? =
The plugin caches data for 15 minutes. BaKhabar Pakistan updates rates 4 times daily during Sarafa market hours (10AM, 1PM, 4PM, 7PM PKT).

= Does this slow down my site? =
No. The plugin caches API responses for 15 minutes using WordPress transients. Your database is hit once every 15 minutes, not on every page load.

== Changelog ==

= 1.0.0 =
* Initial release
* Live gold rates from BaKhabar Pakistan API
* Widget + shortcode support
* Light/dark themes
* Optional credit link (off by default)
* 15-minute smart caching
* Deactivation cleanup
