=== Hesapis Market Data - Gold, Currency & Crypto Prices ===
Contributors: hesapis
Donate link: https://www.hesapis.com
Tags: gold prices, currency exchange, crypto, bitcoin, widgets
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.4.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Real-time gold prices, currency exchange rates, and cryptocurrency data widgets for WordPress. Beautiful, customizable, and easy to use.

== Description ==

**Hesapis Market Data** brings real-time financial data to your WordPress website with beautiful, customizable widgets.

= Features =

* **Gold Prices**: Gram gold, quarter gold, half gold, full gold, gold ounce, silver
* **Currency Rates**: USD, EUR, GBP, CHF, JPY, SAR, CAD, AUD, CNY, RUB and more
* **Cryptocurrency**: Bitcoin, Ethereum, Ripple, Solana, Cardano, Dogecoin and 10+ more
* **Universal Widget**: Mix gold, currency, and crypto in a single widget!
* **Multiple Displays**: Cards, table, list, mini, ticker, marquee views
* **Themes**: Light, dark, and auto (follows system preference)
* **Responsive Design**: Mobile-friendly layouts
* **Auto-refresh**: Data updates automatically
* **Smart Cache**: 3-layer caching system for reliability
* **Multi-language**: English, Turkish, German, French, Spanish, Arabic, Russian
* **Shortcode Support**: Add anywhere with simple shortcodes
* **Widget Support**: Drag & drop to sidebars
* **Gutenberg Blocks**: Full block editor support
* **Elementor Widgets**: Native Elementor integration

= Shortcodes =

**Gold Prices:**
`[hesapis_gold display="cards" theme="light"]`

**Currency Rates:**
`[hesapis_currency display="table" items="USDTRY,EURTRY,GBPTRY"]`

**Cryptocurrency:**
`[hesapis_crypto display="cards" items="BTC,ETH,SOL"]`

**Universal (Mixed):**
`[hesapis items="ALTIN,USDTRY,BTC,ETH" display="cards"]`

**Single Item:**
`[hesapis_single type="gold" item="ALTIN"]`

**Ticker:**
`[hesapis_ticker type="gold" speed="normal"]`

= Supported Gold Types =

* ALTIN - Gram Gold
* CEYREK_YENI - Quarter Gold
* YARIM_YENI - Half Gold
* TEK_YENI - Full Gold
* ATA_YENI - Republic Gold
* ONS - Gold Ounce
* GUMUSTRY - Gram Silver
* GUMUSIONS - Silver Ounce

= Supported Currencies =

* USDTRY - US Dollar
* EURTRY - Euro
* GBPTRY - British Pound
* CHFTRY - Swiss Franc
* JPYTRY - Japanese Yen
* CADTRY - Canadian Dollar
* AUDTRY - Australian Dollar
* SARTRY - Saudi Riyal
* CNYTRY - Chinese Yuan
* RUBTRY - Russian Ruble

= Supported Cryptocurrencies =

Bitcoin (BTC), Ethereum (ETH), Ripple (XRP), Solana (SOL), Cardano (ADA), Dogecoin (DOGE), Polkadot (DOT), Avalanche (AVAX), Polygon (MATIC), Chainlink (LINK), Litecoin (LTC), Uniswap (UNI), Cosmos (ATOM), Stellar (XLM), Algorand (ALGO)

= API Key Required =

This plugin requires a free API key from Hesapis.com.

**Get your API key:** [https://www.hesapis.com/widget-kayit](https://www.hesapis.com/widget-kayit)

Simply enter your domain and email to receive your API key instantly (format: `HW_xxxxx`).

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/hesapis-market-data/` or install through WordPress plugins screen
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Go to Settings > Hesapis Market Data
4. Enter your API key from [Hesapis.com](https://www.hesapis.com)
5. Configure your preferences and start using shortcodes or blocks

= Manual Installation =

1. Download the plugin ZIP file
2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
3. Select the ZIP file and click "Install Now"
4. Activate the plugin

== Frequently Asked Questions ==

= How do I get an API key? =

1. Visit [https://www.hesapis.com/widget-kayit](https://www.hesapis.com/widget-kayit)
2. Enter your domain (e.g., yoursite.com)
3. Enter your email address
4. Click "Register" to get your key instantly
5. Copy the key (starts with `HW_`) and paste it in plugin settings

= How often is data updated? =

Data is fetched in real-time from the Hesapis.com API. You can configure cache duration in settings (recommended: 60-300 seconds).

= What happens if the API is down? =

The plugin uses a 3-layer cache system. If the API is unavailable, it will display cached data to ensure your website always shows prices.

= Is it compatible with Elementor? =

Yes! Hesapis Market Data includes native Elementor widgets. Just search for "Hesapis" in the Elementor panel.

= Does it work with Gutenberg? =

Yes! The plugin provides Gutenberg blocks for gold, currency, and crypto widgets.

= Can I mix different data types? =

Yes! Use the universal widget: `[hesapis items="ALTIN,USDTRY,BTC"]` to display gold, currency, and crypto together.

= Is it free? =

The plugin is free. Hesapis.com offers free and premium API plans. Check their website for details.

= What languages are supported? =

English (default), Turkish, German, French, Spanish, Arabic, and Russian.

== Screenshots ==

1. Gold prices in cards view (light theme)
2. Currency rates in table view (dark theme)
3. Cryptocurrency cards widget
4. Gutenberg block editor integration
5. Admin settings page
6. Elementor widget editor

== Changelog ==

= 2.4.8 =
**Fixed**

* **The ticker stopped at the end instead of looping.** The wrap test used
  half the scroll width, but `scrollLeft` can never exceed
  `scrollWidth - clientWidth`. When the strip was not wide enough, that
  ceiling stayed below half the width, the wrap never triggered and the
  strip simply stopped. One repetition's width is now measured from the
  items themselves, and the content is repeated further if there is not
  enough room to loop.

* **`accent_color` and `bg_secondary_color` did nothing.** Both are
  documented shortcode attributes and both were accepted without
  complaint, but no stylesheet rule ever read the custom properties they
  set - `--hesapis-accent` and `--hesapis-primary` were declared in
  `:root` and never used, and `--hesapis-bg-secondary` / `--hesapis-card-bg`
  were not declared at all. The accent colour now drives the widget
  heading rule and the ticker labels; the secondary background drives
  table header rows and card surfaces.
* **The swipeable ticker from 2.4.3 did not work.** The strip was animated
  with a CSS transform, and transforms create no scrollable overflow, so a
  scrollable container had nothing to scroll. Auto-scroll and dragging now
  share one mechanism (`scrollLeft`), which also removes the class of bug
  where the two fought each other and pushed content out of view.
* **Ticker text sped up and vanished after a few minutes.** The script
  duplicated the strip's contents on every initialisation, and
  initialisation also runs on each auto-refresh, so copies doubled: 4, 8,
  16. With a fixed duration every doubling made the strip twice as fast.
  The markup already contains the two copies the loop needs, so the
  duplication was removed entirely. This affected 2.4.1 and 2.4.2 too.

**Added**

* **`margin` attribute for the ticker.** Themes often wrap widget areas in
  30-40px of bottom margin, which leaves the strip floating away from the
  content below it. `margin="0"` closes the gap; any CSS length works.
* Ticker edge fades stay pinned to the edges while the strip is scrolled.

= 2.4.3 =
**Fixed**

* **Settings page was unreachable.** The "Settings" link on the Plugins
  screen pointed to `options-general.php?page=hesapis-market-data`, while
  the menu was registered as
  `hesapis-market-data-gold-currency-crypto-prices`. Because the slugs did
  not match, WordPress responded with "Sorry, you are not allowed to
  access this page" - so new users could never reach the screen to enter
  their API key.
* **Currency table showed the wrong denomination.** With
  `hesapis_currency` set to TRY, USDTRY was still rendered in euro
  (EUR0.8562) and the other pairs in dollars. The ticker on the same page
  showed the correct lira value, so two widgets disagreed about identical
  API data. The setting is now honoured.
* **Turkish translation never loaded.** The catalog was named
  `hesapis-market-data-tr_TR.mo` while the text domain is
  `hesapis-market-data-gold-currency-crypto-prices`. WordPress could not
  match the file and silently fell back to English. The file now matches
  the text domain.
* **"Cache Duration" setting had no effect.** The cache class used the
  hard-coded `HESAPIS_CACHE_TIME` constant instead of reading the option.
* **Up/down colour options did nothing.** `positive_color` and
  `negative_color` were emitted as `--hesapis-positive/negative`, but the
  stylesheet reads `--hesapis-up/down`.

**Added**

* **Adjustable ticker speed.** A 5-120 second slider on the settings page,
  plus a per-instance `speed="20"` shortcode attribute. The previous
  `slow` / `normal` / `fast` keywords keep working.
* **Swipeable ticker.** On touch devices you can now drag the strip left
  and right to reach the next quotes. Touching pauses the animation; it
  resumes 2.5 seconds after release.
* **Appearance options for the ticker.** `bg_color`, `text_color`,
  `border_color`, `accent_color`, `positive_color` and `negative_color`
  - available on the other widgets but missing here - now work on the
  ticker, along with new `font_size` and `padding` attributes.
* **Accessibility.** The animation stops for visitors who ask their
  system to reduce motion (WCAG 2.3.3); because the strip is now
  swipeable, no data becomes unreachable. The ticker is exposed as a
  labelled region.

**Compatibility**

* Tested with WordPress 7.1.

= 2.4.0 =
* NEW: Universal widget - mix gold, currency, and crypto in one widget
* NEW: Centralized translation system
* IMPROVED: English as default language for global audience
* IMPROVED: WordPress.org guidelines compliance
* IMPROVED: Security enhancements
* FIXED: Translation issues in Single and Compact widgets

= 2.3.0 =
* Added sparkline charts
* Added vertical ticker
* Performance improvements

= 2.0.0 =
* Complete redesign
* Added Elementor support
* Added Gutenberg blocks
* New caching system

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 2.4.8 =
Makes accent_color and bg_secondary_color actually work, and fixes the ticker:
it no longer stops at the end, speeds up over time, or ignores drag gestures.

= 2.4.3 =
Important fix: the Settings link was broken, which prevented new users from
entering their API key. Also corrects the currency table showing the wrong
denomination and restores the Turkish translation. Update recommended.

= 2.4.0 =
Major update with universal widget support and improved translations. Recommended for all users.

== Privacy Policy ==

This plugin connects to the Hesapis.com API to fetch financial data. No personal user data is collected or transmitted. The plugin only sends:

* Your website domain (for API authentication)
* Requested data type (gold, currency, crypto)

For more information, visit [Hesapis.com Privacy Policy](https://www.hesapis.com/privacy).

== Additional Info ==

**Data Source:** All financial data is provided by [Hesapis.com](https://www.hesapis.com) API.

**Support:** For questions, visit [Hesapis.com](https://www.hesapis.com) or open an issue on our support forum.

**Documentation:** Full documentation is included with the plugin (USER-GUIDE-EN.md and KULLANIM-KILAVUZU-TR.md).
