=== Jaygozin جایگزین هوشمند فارسی===
Contributors: eftekhar
Donate link: https://telegramapi.ir
Tags: variables, shortcode, jalali, persian, replace
Requires at least: 6.1
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

Replace custom variables, Jalali/Gregorian/Hijri dates, and optional live crypto prices using shortcodes or %variable% patterns.

== Description ==

**Jaygozin** is a WordPress variable replacement plugin.

Define reusable text variables once and show them anywhere on your site. Ideal for sites that need dynamic dates, frequently updated text, and optional live cryptocurrency prices — without editing dozens of pages by hand.

= Why it helps your site (including SEO) =

* **Consistent, up-to-date content:** Change a variable once; every place it is used updates automatically. Useful for phone numbers, addresses, campaign slogans, prices, and dates.
* **Fresher pages for visitors and search engines:** Dynamic dates (Jalali, Gregorian, Hijri) and optional live prices keep content current without republishing posts.
* **Fewer outdated snippets:** Avoid forgotten old years, expired promotions, or wrong contact details scattered across posts and widgets.
* **Flexible placement:** Works in posts, pages, titles, and widgets via `%variable%` patterns or shortcodes.
* **Lightweight control:** Enable replacement only where you need it to keep performance predictable.

= Features =

* **Custom variables** – Unlimited named variables, reusable site-wide
* **Two usage methods:**
  * Text pattern: `%myvar%`
  * Shortcode: `[jaygozin name="myvar"]` or `[jgz_date]`, `[jgz_btc]`, etc.
* **Built-in date variables** (numeric and textual):
  * Jalali (Shamsi): `%date%`, `%date_text%`, `%year%`
  * Gregorian: `%miladi%`, `%miladi_text%`
  * Hijri (Qamari): `%ghamari%`, `%ghamari_text%`
* **Optional live crypto prices** from Nobitex (BTC, USDT, ETH, DOGE):
  * Auto-update with selectable interval (5–120 minutes)
  * Manual override; auto-update is off by default
* **Processing control** – Posts, pages, titles, widgets
* Clean admin UI; no external PHP libraries required

= How to use =

1. Open **Jaygozin** in the WordPress admin menu
2. Create custom variables and/or configure dates and prices
3. Insert placeholders in content, titles, or widgets:

`
%date%
%date_text%
%year%
%btc%
%my_custom_var%
[jgz_date]
[jgz_btc]
[jaygozin name="welcome"]
`

= Author =

Developed by **Seyed Mohammad Eftekhar**  
Plugin page: [telegramapi.ir/jaygozin](https://telegramapi.ir/jaygozin)  
Website: [telegramapi.ir](https://telegramapi.ir)

---

**نسخه فارسی توضیحات**

**جایگزین (Jaygozin)** افزونه جایگذاری متغیر سفارشی در وردپرس است.

یک‌بار متغیر تعریف کنید و همان را در نوشته‌ها، برگه‌ها، عنوان‌ها و ویجت‌ها نمایش دهید. مناسب سایت‌هایی که به تاریخ پویا، متن‌های تکراری و قیمت به‌روز نیاز دارند.

= مزایا برای به‌روز بودن سایت و سئو =

* **محتوای یکپارچه و به‌روز:** با تغییر یک متغیر، همه جاهایی که استفاده شده به‌روز می‌شوند (شماره تماس، آدرس، شعار کمپین، قیمت، سال و …).
* **صفحات تازه‌تر برای کاربر و موتور جستجو:** تاریخ شمسی/میلادی/قمری و در صورت نیاز قیمت لحظه‌ای باعث می‌شود محتوا کهنه نماند.
* **کاهش متن‌های منقضی:** دیگر لازم نیست ده‌ها نوشته را برای عوض کردن یک جمله یا سال دستی ویرایش کنید.
* **انعطاف در محل نمایش:** با `%متغیر%` یا شورت‌کد در محتوا، عنوان و ویجت.
* **کنترل سبک:** فقط بخش‌های لازم را برای جایگزینی فعال کنید.

= امکانات =

* متغیر سفارشی نامحدود
* الگوی `%name%` و شورت‌کد `[jaygozin name="name"]` / `[jgz_date]` و …
* تاریخ شمسی، میلادی و قمری (عددی و حروفی)
* قیمت اختیاری ارز از نوبیتکس (بیت‌کوین، تتر، اتریوم، دوج) با بازه به‌روزرسانی قابل تنظیم
* کنترل محل پردازش: نوشته، برگه، عنوان، ویجت

== Installation ==

1. Upload the `jaygozin` folder to `/wp-content/plugins/`, or install via Plugins → Add New → Upload Plugin.
2. Activate the plugin.
3. Go to **Jaygozin** in the admin menu.
4. Create variables and use `%variable%` or shortcodes in your content.

== Frequently Asked Questions ==

= Does it require an API key for Nobitex? =

No. Public market endpoints are used. Automatic price updates are optional and disabled by default.

= Why are prices not updating? =

Nobitex may limit requests from some networks or regions. Use manual prices, or host in a supported region. Check the last error message in the plugin settings.

= Can variables help with SEO? =

Indirectly: they help keep repeated facts (year, contact info, offers, dates) consistent and current across many URLs, which reduces outdated content. The plugin does not inject hidden SEO markup by itself.

= Will shortcodes conflict with other plugins? =

Built-in shortcodes use the `jgz_` prefix. The main shortcode is `[jaygozin]`.

== External services ==

This plugin can optionally connect to the **Nobitex** public market API to fetch cryptocurrency prices (Bitcoin, Tether, Ethereum, Dogecoin) in Iranian Rial.

* **Used for:** Showing up-to-date crypto prices when auto-update is enabled.
* **Data sent:** Server-side requests to public market stats only. No personal data, accounts, or tokens.
* **When:** On a schedule chosen by the admin, or on manual refresh; values are cached in transients.
* **Provider:** [nobitex.ir](https://nobitex.ir/)
* **Policies:** [https://nobitex.ir/policies/](https://nobitex.ir/policies/)

Auto-update is **off by default**. You can use manual prices only.

== Screenshots ==

1. Main settings – create and manage custom variables
2. Built-in date and price variables with live preview
3. Price settings, update interval, and processing location controls

== Changelog ==

= 1.0.0 =
* Initial public release
* Custom variables with %var% patterns and shortcodes
* Unique `jgz_` shortcode prefix
* Jalali, Gregorian, and Hijri dates
* Optional Nobitex crypto prices with selectable interval
* Processing controls for posts, pages, titles, and widgets

== Upgrade Notice ==

= 1.0.0 =
Initial release.

== Privacy ==

When automatic price updates are enabled, the plugin requests public market data from Nobitex (`api.nobitex.ir` / `apiv2.nobitex.ir`). No personal data is sent. Prices are cached locally with WordPress transients. See External services for policy links.
