| 开发者 | khaledhelwane |
|---|---|
| 更新时间 | 2026年9月29日 00:53 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[alyawmgold_prices]
Example with attributes:
[alyawmgold_prices country="SA" metal="gold" karats="24,22,21,18" unit="gram" view="cards" theme="auto" language="ar"]
Single price:
[alyawmgold_prices metal="gold" karats="24" view="single"]
Small bar below a site header:
[alyawmgold_prices country="AE" metal="both" view="bar" width="full" height="64" controls="off"]
The country attribute fixes the starting market. Set controls="on" to let visitors change market and metal, or controls="off" for a compact bar. Price-widget height is a minimum height: content can grow on narrow screens. width accepts auto, full, a pixel value such as 900px (bounded to 240–1600 px), or a percentage such as 75% (bounded to 25–100%). Width never exceeds the containing theme column.
History:
[alyawmgold_history metal="gold" period="30d" theme="auto" language="en"]
Supported history periods are 7d, 30d, 60d, 90d, 6m, 1y, and 5y. Historical data in API v1 is intentionally shown in USD per troy ounce. The plugin does not convert old observations using today's exchange rate.
History also accepts width, and height controls the chart area from 220 to 600 px. In block themes, place a Shortcode block below the Header template part in the Site Editor to show the price bar across a template. Placement in classic themes depends on the theme's template or widget areas.
External service
This plugin connects to the AlyawmGold public API at https://alyawmgold.com/api/v1 to obtain current and historical precious-metal data. This connection is necessary for the plugin's displayed prices and charts.
Service endpoints used:
https://alyawmgold.com/api/v1/spot/latest for current prices.https://alyawmgold.com/api/v1/history for historical data.alyawmgold-prices folder to /wp-content/plugins/.[alyawmgold_prices] or [alyawmgold_history] to a post, page, or shortcode-compatible widget.No. AlyawmGold API v1 currently provides anonymous public access. The plugin caches responses and respects the service's rate limits.
Use one of the supported market codes: AE, SA, KW, QA, BH, OM, or USD.
API v1 does not have a complete historical foreign-exchange series. Converting old prices with today's exchange rate would be misleading, so the history widget preserves the original USD-per-troy-ounce contract.
For selected markets, AlyawmGold may provide a calibrated local estimate. It is informational, not a dealer quote, and excludes individual shop premiums, making charges, taxes, and fees.
If the website has a previously successful response for the same request, the plugin displays it with a visible cached-data notice. If no saved response exists, it displays an accessible temporary-unavailable message.
Not by default. A site administrator may explicitly enable a small “Prices powered by AlyawmGold” credit in the settings. The plugin works fully when attribution is disabled.
No. It contains no visitor analytics or advertising code and does not send visitor data to AlyawmGold.