=== نرخ زنده ===
Contributors: Nerkh.IO
Tags: currency rates, gold price, crypto price, exchange rates, live rates
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.1.84
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display live gold, currency, coin and cryptocurrency prices with a customizable sticky bar.

== External Services ==

This plugin relies on the following external services:

=== Nerkh.IO Service ===

* Service description: Nerkh.IO provides real-time financial market data (gold, currency, coins and cryptocurrencies) via a REST API.
* Usage: Fetching live prices to display on the site through the shortcode widget and/or the sticky price bar.
* Data sent and when:
  - The API key (for authentication) is sent with every request to api.nerkh.io.
  - A request is sent when an admin performs a "test" or "connect" action from the plugin settings page.
  - Automatic requests are sent at defined intervals (every 10, 30 or 60 minutes) via the WordPress cron to keep prices fresh.
  - No personal user or visitor data is sent.

=== Nerkh.IO Website (nerkh.io) ===

* Service description: The main website of the Nerkh.IO service.
* Usage: The "Nerkh ❤" (brand referral) link shown in the frontend sticky price bar links to https://nerkh.io. This is required by the API terms of use.
* Data sent: No data from the plugin is sent to nerkh.io. The link is only displayed in the browser for the end user to click.
* Provider: Nerkh.IO
* Website: https://nerkh.io
* Terms of use: https://nerkh.io/terms
* Privacy policy: https://nerkh.io/privacy

== Description ==

Nerkh Live is a professional WordPress plugin that lets you display live prices of gold, currency, coins and cryptocurrencies on your website.

The plugin retrieves real-time financial data from an API web service and automatically displays the rates on your site using a fully customizable sticky price bar.

Users can easily connect the plugin to the API by entering their API key obtained from the main website.

The plugin is completely free and compatible with WordPress and WooCommerce.

== Features ==

* Live gold price display
* Live currency price display
* Live coin price display
* Live cryptocurrency price display
* Automatic price fetching from the API
* Configurable update interval:
  * Every 10 minutes
  * Every 30 minutes
  * Every 60 minutes
* Sticky price bar
* Display at the top or bottom of the site
* Full style customization
* Background color setting
* Light and dark mode support
* Custom colors for each item
* Price color setting
* Separator color setting
* Unit symbol color setting
* Font size setting
* Selectable display items
* Support for 23+ financial items
* API connection test
* API response test
* Easy installation and setup
* WooCommerce compatible
* Lightweight and optimized

== Supported Items ==

The plugin supports various financial categories:

* Gold
* Coins
* Dollar
* Euro
* Foreign currencies
* Bitcoin
* Tether
* Cryptocurrencies
* Digital currencies

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/` folder.
2. Activate the plugin from the 'Plugins' menu in WordPress.
3. Open the Nerkh Live settings page.
4. Enter your API key.
5. Save the settings.
6. Configure the display style and update interval.
7. Done! Live prices are now shown on your site.

== Frequently Asked Questions ==

= Is the plugin free? =

Yes. Nerkh Live is completely free for WordPress and WooCommerce users.

= How do I connect the plugin to the API? =

Get your API key from the main website and enter it in the plugin settings page.

= Can I customize the design? =

Yes. You can fully customize the colors, fonts, bar position and display style.

= Can I choose which items to display? =

Yes. You can select only the financial items you want to show on your site.

= Does the plugin support automatic updates? =

Yes. The plugin can update prices automatically every 10, 30 or 60 minutes.

== Screenshots ==

1. Live sticky price bar
2. Plugin settings panel
3. API connection test section
4. Financial item selection
5. Display customization settings

== Changelog ==

= 2.1.84 =

* Removed the drop shadow under the frontend table widget

= 2.1.83 =

* Table shortcode and table AJAX now work only when the table widget is selected; bar and table are mutually exclusive

= 2.1.82 =

* Treat network errors and invalid/empty API responses as failures
* Show API error codes and hide prices in the table and rates widgets; keep AJAX shells for automatic recovery

= 2.1.81 =

* Suppressed third-party WordPress admin notices on the plugin screen so they cannot break the header

= 2.1.80 =

* Fresh installs now preselect six default items for both bar and table widgets

= 2.1.79 =

* Renamed the plugin to «نرخ زنده» on the Plugins screen

= 2.1.78 =

* Added activation + weekly heartbeat reporting to dl.nerkh.io

= 2.1.77 =

* Updated the free-token renewal text and lightened the interval warning box

= 2.1.76 =

* Added linked token/panel URLs and moved interval limits into an orange warning box

= 2.1.75 =

* Removed the inline test-results block (toast only) and updated the token help text

= 2.1.74 =

* Made AJAX price endpoints cache-safe (no-cache headers, no stale-nonce failures) and added auto-refresh to the rates widget

= 2.1.73 =

* Added success and failure notifications to the test-fetch button

= 2.1.72 =

* Removed the fetched item count from the API connection success notification

= 2.1.71 =

* Added a numbered step guide for saving the API key, testing the connection and fetching prices

= 2.1.70 =

* Swapped the table date/time order and matched the update button font to the table

= 2.1.69 =

* Fixed the table update time losing minutes and restyled the brand link with a navy outline heart

= 2.1.68 =

* Removed the stray horizontal scrollbar under the table

= 2.1.67 =

* Narrowed the price column and overall table by 10px

= 2.1.66 =

* Reduced the item column and the overall table width by 10px each

= 2.1.65 =

* Kept table column widths proportional so the change column stays visible on narrow screens

= 2.1.64 =

* Set exact table column widths (4px narrower per column)

= 2.1.63 =

* Slimmed the table overall, including the item and price columns

= 2.1.62 =

* Fine-tuned the table price column width

= 2.1.61 =

* Narrowed the table price column by another 10px

= 2.1.60 =

* Narrowed the table price column and overall table width by ~20px each

= 2.1.59 =

* Narrowed the table item column further and rebalanced the price column

= 2.1.58 =

* Narrowed the table item column by 10px

= 2.1.57 =

* Rebuilt the frontend price table layout: aligned columns, narrower change column and a consistent header highlight

= 2.1.56 =

* Widgets tab: plain active radio indicator, auto-opened settings and improved accordion styling
* Normalised legacy widget types such as "block" back to a supported widget

= 2.1.55 =

* Widgets tab: highlighted active widget, opened its settings automatically and refreshed the accordion UI

= 2.1.54 =

* Reduced the admin footer height

= 2.1.53 =

* Kept the active admin tab across page reloads via the URL

= 2.1.52 =

* Centred the admin page even when other admin-style plugins override .wrap margins

= 2.1.51 =

* Centred the admin settings page with equal left/right spacing

= 2.1.50 =

* Moved the bar brand badge markup and CSS into the encrypted API file

= 2.1.49 =

* Fine-tuned vertical centring of the NERKH.IO label in the brand badge

= 2.1.48 =

* Vertically centred the NERKH.IO label inside the brand badge

= 2.1.47 =

* Locked the bar height so the brand badge no longer moves between price and error states
* Increased the bar height by 5px

= 2.1.46 =

* Redesigned the bar error state to match the brand badge and show the API error code
* Locked the bar height so the ticker and error state never resize it

= 2.1.45 =

* Centralized brand, company and API configuration in `includes/nerkh-live-api.php`
* Removed duplicated brand/social strings and hard-coded API host fallbacks
* Fixed duplicate admin font stylesheet enqueue
* Added capability check to the widget color-reset AJAX handler
* Uninstall now clears cached prices before dropping the tables

= 2.1.13 =

* Fixed plugin automatic update issue

= 2.1.9 =

* Added per-item dedicated shortcodes (e.g. `[NERKH_GOLD18K]`, `[NERKH_USD]`)
* Dedicated shortcodes display only the formatted number (without currency unit)
* Added shortcode help box in the admin settings page
* Added copy button with tooltip for shortcodes
* Added cache-excluded files help box (for LiteSpeed, WP Rocket, Cloudflare)
* Added "Load prices via AJAX" option in settings (default: enabled)
* Fixed raw item keys showing instead of Persian labels in the main shortcode
* Fixed price freeze issue with server cache (LiteSpeed Cache, WP Rocket, Cloudflare)

= 2.1.8 =

* Added AJAX display mode for price shortcodes - prices are read from the database via Ajax, fixing server cache issues (LiteSpeed Cache, WP Rocket, Cloudflare)
* Added "Load prices via AJAX" option in plugin settings (default: enabled)
* Added colored warning for users using server cache
* Added loading animation (loading pulse) while fetching prices
* Fixed raw item keys showing instead of Persian labels in shortcodes

= 2.1.7 =

* Completed Persian localization of the environment and admin panel

= 2.1.6 =

* Updated external service documentation - full API communication disclosure, terms of use and privacy policy links in readme
* Replaced inline debug script with proper wp_enqueue_script() and wp_localize_script()
* Fixed sticky bar price freeze caused by cache plugins (LS Cache, WP Rocket)
* Sticky bar now fetches prices via Ajax to bypass page cache
* Sticky bar prices auto-update based on the cron interval
* Bar element appended to document.body instead of document.documentElement

= 2.1.5 =

* Security hardening - all outputs properly escaped
* Fixed database query warnings
* Improved PHPCS compatibility
* Code quality improvements

= 2.1.4 =

* Fixed plugin structure
* Added automatic update interval
* Added API connection test
* Added customizable sticky bar
* Improved WooCommerce compatibility
* Performance improvements
* UI and settings improvements

== Upgrade Notice ==

= 2.1.2 =
 Added AJAX mode for price display and fixed server cache issue. Shortcode prices are now loaded via Ajax.

= 2.1.1 =
 Added per-item dedicated shortcodes, AJAX mode to prevent price caching, and cache-exclusion file guide.

= 2.1.1 =
 Added full third-party service documentation for WordPress.org compliance and moved debug page scripts to proper WordPress enqueue methods.

= 2.1.0 =
 Security updates and code quality compliance.

= 2.1.0 =
 Security updates and code quality compliance.
