Changeset 3778033
- Timestamp:
- 11/01/2026 12:45:04 PM (14 hours ago)
- Location:
- ezrate-price-widgets
- Files:
-
- 16 edited
- 1 copied
-
tags/2.3.0 (copied) (copied from ezrate-price-widgets/trunk )
-
tags/2.3.0/assets/css/ezrpw.css (modified) (1 diff)
-
tags/2.3.0/blocks/widget/block.json (modified) (1 diff)
-
tags/2.3.0/ezrate-price-widgets.php (modified) (2 diffs)
-
tags/2.3.0/includes/class-ezrpw-admin.php (modified) (3 diffs)
-
tags/2.3.0/includes/class-ezrpw-format.php (modified) (5 diffs)
-
tags/2.3.0/includes/class-ezrpw-render.php (modified) (3 diffs)
-
tags/2.3.0/readme.txt (modified) (4 diffs)
-
tags/2.3.0/uninstall.php (modified) (1 diff)
-
trunk/assets/css/ezrpw.css (modified) (1 diff)
-
trunk/blocks/widget/block.json (modified) (1 diff)
-
trunk/ezrate-price-widgets.php (modified) (2 diffs)
-
trunk/includes/class-ezrpw-admin.php (modified) (3 diffs)
-
trunk/includes/class-ezrpw-format.php (modified) (5 diffs)
-
trunk/includes/class-ezrpw-render.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ezrate-price-widgets/tags/2.3.0/assets/css/ezrpw.css
r3777366 r3778033 98 98 /* footer */ 99 99 .ezrpw-ft { display: flex; justify-content: space-between; align-items: center; gap: .6em; padding: .4em 1em; border-top: 1px solid var(--ezrpw-border); font-size: .76em; color: var(--ezrpw-muted); flex-wrap: wrap; } 100 .ezrpw-credit { color: var(--ezrpw-accent) !important; font-weight: 600; } 100 .ezrpw-credit { display: inline-flex; align-items: center; gap: .4em; color: var(--ezrpw-muted) !important; font-weight: 500; text-decoration: none !important; white-space: nowrap; } 101 .ezrpw-credit img { width: 1.35em; height: 1.35em; border-radius: .3em; flex: none; margin: 0; box-shadow: none; } 102 .ezrpw-credit b { color: var(--ezrpw-accent); font-weight: 700; } 103 .ezrpw-credit:hover b { text-decoration: underline; } 104 /* ticker / price bar: the source at the end of the row */ 105 .ezrpw-t-ticker { display: flex; align-items: center; } 106 .ezrpw-t-ticker .ezrpw-track-wrap { flex: 1; min-width: 0; } 107 .ezrpw-src { flex: none; display: inline-flex; align-items: center; padding: 0 .9em; font-size: .78em; border-inline-start: 1px solid var(--ezrpw-border); align-self: stretch; } 101 108 /* placed automatically above / below the text of a post or page */ 102 109 .ezrpw-auto { margin: 0 0 1.5em; clear: both; } -
ezrate-price-widgets/tags/2.3.0/blocks/widget/block.json
r3777366 r3778033 3 3 "apiVersion": 3, 4 4 "name": "ezrate-price-widgets/widget", 5 "version": "2. 2.0",5 "version": "2.3.0", 6 6 "title": "EZRate price widget", 7 7 "category": "widgets", -
ezrate-price-widgets/tags/2.3.0/ezrate-price-widgets.php
r3777366 r3778033 1 1 <?php 2 2 /** 3 * Plugin Name: EZRate Price Widgets 3 * Plugin Name: EZRate Price Widgets – Live Dollar, Gold, Coin & Crypto Prices 4 4 * Plugin URI: https://ezrate.me/services/widgets/en 5 5 * Description: Live Iranian free-market rates (US dollar, euro, gold, coins, USDT and crypto) in Toman: ticker, price bar, cards, table and chart widgets. Shortcode, block and classic widget; every setting in your dashboard. 6 * Version: 2. 2.06 * Version: 2.3.0 7 7 * Requires at least: 6.3 8 8 * Requires PHP: 7.4 … … 20 20 } 21 21 22 define( 'EZRPW_VERSION', '2. 2.0' );22 define( 'EZRPW_VERSION', '2.3.0' ); 23 23 define( 'EZRPW_FILE', __FILE__ ); 24 24 define( 'EZRPW_DIR', plugin_dir_path( __FILE__ ) ); -
ezrate-price-widgets/tags/2.3.0/includes/class-ezrpw-admin.php
r3777366 r3778033 69 69 add_action( 'admin_post_ezrpw_welcome_off', array( __CLASS__, 'welcome_off' ) ); 70 70 add_action( 'admin_notices', array( __CLASS__, 'welcome' ) ); 71 add_action( 'admin_notices', array( __CLASS__, 'credit_ask' ) ); 72 add_action( 'admin_post_ezrpw_credit', array( __CLASS__, 'credit_answer' ) ); 71 73 add_filter( 'plugin_action_links_' . plugin_basename( EZRPW_FILE ), array( __CLASS__, 'action_links' ) ); 72 74 } … … 571 573 <td> 572 574 <label><input type="checkbox" name="ezrpw_settings[link_rates]" value="1" <?php checked( $s['link_rates'] ); ?>> <?php esc_html_e( 'Link each price to its page on ezrate.me (chart and history)', 'ezrate-price-widgets' ); ?></label><br> 573 <label><input type="checkbox" name="ezrpw_settings[credit]" value="1" <?php checked( $s['credit'] ); ?>> <?php esc_html_e( 'Show a small « Rates by EZRate» link under cards, tables and charts— thank you, it keeps this plugin free', 'ezrate-price-widgets' ); ?></label>575 <label><input type="checkbox" name="ezrpw_settings[credit]" value="1" <?php checked( $s['credit'] ); ?>> <?php esc_html_e( 'Show a small «Source: EZRate» link (with its icon) in every widget — thank you, it keeps this plugin free', 'ezrate-price-widgets' ); ?></label> 574 576 <p class="description"><?php esc_html_e( 'Both are off by default: the plugin adds no links to your site unless you allow it.', 'ezrate-price-widgets' ); ?></p> 575 577 </td></tr> … … 699 701 700 702 /** 703 * Asks once (administrators, on the dashboard, Plugins and EZRate screens) whether the widgets may show the small 704 * «Source: EZRate» link. Nothing is added to the site unless the owner says yes; «No thanks» is never asked again. 705 */ 706 public static function credit_ask() { 707 if ( get_option( 'ezrpw_credit_asked' ) || get_option( 'ezrpw_welcome' ) || ! current_user_can( self::CAP ) || ! EZRPW_Widgets::all() ) { 708 return; 709 } 710 $s = EZRPW_Widgets::settings(); 711 if ( ! empty( $s['credit'] ) ) { 712 return; 713 } 714 $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null; 715 if ( $screen && ! in_array( $screen->id, array( 'dashboard', 'plugins' ), true ) && false === strpos( (string) $screen->id, 'ezrpw' ) ) { 716 return; 717 } 718 $url = function ( $do ) { 719 return wp_nonce_url( admin_url( 'admin-post.php?action=ezrpw_credit&do=' . $do ), 'ezrpw_credit' ); 720 }; 721 echo '<div class="notice notice-info"><p><strong>' . esc_html__( 'May your price widgets show a small «Source: EZRate» link?', 'ezrate-price-widgets' ) . '</strong> ' 722 . esc_html__( 'It names where the rates come from and helps keep this plugin and its data free. You can change this any time in EZRate › Settings.', 'ezrate-price-widgets' ) . '</p><p>' 723 . '<a class="button button-primary" href="' . esc_url( $url( 'on' ) ) . '">' . esc_html__( 'Yes, show the source', 'ezrate-price-widgets' ) . '</a> ' 724 . '<a class="button" href="' . esc_url( $url( 'off' ) ) . '">' . esc_html__( 'No thanks', 'ezrate-price-widgets' ) . '</a></p></div>'; 725 } 726 727 /** 728 * Answer of the «Source: EZRate» question. 729 */ 730 public static function credit_answer() { 731 self::guard( 'ezrpw_credit' ); 732 $do = isset( $_GET['do'] ) ? sanitize_key( wp_unslash( $_GET['do'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- checked by guard() above. 733 update_option( 'ezrpw_credit_asked', 1, false ); 734 if ( 'on' === $do ) { 735 $s = EZRPW_Widgets::settings(); 736 $s['credit'] = true; 737 update_option( EZRPW_Widgets::SETTINGS, $s ); 738 } 739 wp_safe_redirect( wp_get_referer() ? wp_get_referer() : admin_url( 'admin.php?page=ezrpw-widgets' ) ); 740 exit; 741 } 742 743 /** 701 744 * Dismiss the welcome notice. 702 745 */ -
ezrate-price-widgets/tags/2.3.0/includes/class-ezrpw-format.php
r3777366 r3778033 37 37 'low' => 'کمترین', 38 38 'high' => 'بیشترین', 39 'credit' => 'قیمتها از', 39 'credit' => 'منبع:', 40 'brand' => 'ایزیریت', 40 41 'nodata' => 'قیمتها بهزودی نمایش داده میشود.', 41 42 ), … … 55 56 'low' => 'Low', 56 57 'high' => 'High', 57 'credit' => 'Rates by', 58 'credit' => 'Source:', 59 'brand' => 'EZRate', 58 60 'nodata' => 'Rates will appear shortly.', 59 61 ), … … 73 75 'low' => 'الأدنى', 74 76 'high' => 'الأعلى', 75 'credit' => 'الأسعار من', 77 'credit' => 'المصدر:', 78 'brand' => 'EZRate', 76 79 'nodata' => 'ستظهر الأسعار قريباً.', 77 80 ), … … 91 94 'low' => 'Мин.', 92 95 'high' => 'Макс.', 93 'credit' => 'Курсы от', 96 'credit' => 'Источник:', 97 'brand' => 'EZRate', 94 98 'nodata' => 'Курсы скоро появятся.', 95 99 ), … … 109 113 'low' => 'En düşük', 110 114 'high' => 'En yüksek', 111 'credit' => 'Kurlar:', 115 'credit' => 'Kaynak:', 116 'brand' => 'EZRate', 112 117 'nodata' => 'Kurlar birazdan görünecek.', 113 118 ), -
ezrate-price-widgets/tags/2.3.0/includes/class-ezrpw-render.php
r3777366 r3778033 265 265 } 266 266 // the list twice: the animation slides by half its width and loops without a gap. 267 return '<div class="ezrpw-track-wrap"><div class="ezrpw-track">' . $items . '<span class="ezrpw-dup" aria-hidden="true">' . $items . '</span></div></div>'; 267 $credit = EZRPW_Widgets::settings()['credit'] ? '<span class="ezrpw-src">' . self::credit( $w['lang'], $data ) . '</span>' : ''; 268 return '<div class="ezrpw-track-wrap"><div class="ezrpw-track">' . $items . '<span class="ezrpw-dup" aria-hidden="true">' . $items . '</span></div></div>' . $credit; 268 269 } 269 270 … … 280 281 $items .= self::item( $r, $w, $data ); 281 282 } 282 return '<div class="ezrpw-row">' . $items . '</div>'; 283 $credit = EZRPW_Widgets::settings()['credit'] ? '<span class="ezrpw-src">' . self::credit( $w['lang'], $data ) . '</span>' : ''; 284 return '<div class="ezrpw-row">' . $items . $credit . '</div>'; 283 285 } 284 286 … … 422 424 $time = EZRPW_Format::date( $data['generated_at'], $lang, 'HH:mm' ); 423 425 $text = EZRPW_Format::t( $lang, 'updated' ) . ' ' . $time . ' - ' . EZRPW_Format::t( $lang, 'unit' ) . ': ' . EZRPW_Format::unit( $lang, isset( $w['cur'] ) ? $w['cur'] : 'irt' ); 424 $credit = $s['credit'] ? '<a class="ezrpw-credit" href="' . esc_url( untrailingslashit( $data['site'] ) . '/' . $lang ) . '" target="_blank" rel="noopener">' . esc_html( EZRPW_Format::t( $lang, 'credit' ) ) . ' EZRate</a>': '<span></span>';426 $credit = $s['credit'] ? self::credit( $lang, $data ) : '<span></span>'; 425 427 return '<div class="ezrpw-ft">' . $credit . '<span>' . esc_html( $text ) . '</span></div>'; 426 428 } 429 430 /** 431 * «Source: [icon] EZRate» — only when the site owner allowed it (Settings, or «Yes» on the notice); the icon comes first 432 * in the reading direction (right in Persian / Arabic, left in the others). 433 * 434 * @param string $lang Language. 435 * @param array $data Data. 436 * @return string 437 */ 438 public static function credit( $lang, $data ) { 439 $site = untrailingslashit( ! empty( $data['site'] ) ? $data['site'] : 'https://ezrate.me' ); 440 return '<a class="ezrpw-credit" href="' . esc_url( $site . '/' . $lang ) . '" target="_blank" rel="noopener">' 441 . '<img src="' . esc_url( EZRPW_URL . 'assets/img/icon-128.png' ) . '" alt="" width="16" height="16" loading="lazy" decoding="async">' 442 . '<span>' . esc_html( EZRPW_Format::t( $lang, 'credit' ) ) . ' <b>' . esc_html( EZRPW_Format::t( $lang, 'brand' ) ) . '</b></span></a>'; 443 } 427 444 } -
ezrate-price-widgets/tags/2.3.0/readme.txt
r3777366 r3778033 1 === EZRate Price Widgets ===1 === EZRate Price Widgets – Live Dollar, Gold, Coin & Crypto Prices === 2 2 Contributors: aslanaria2000 3 Tags: currency, exchange rate, gold price, toman, ticker3 Tags: exchange rates, gold price, currency, crypto prices, toman 4 4 Requires at least: 6.3 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2. 2.07 Stable tag: 2.3.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Live Iranian free-market rates in Toman — US dollar, euro, gold, coins, USDT and crypto — as a ticker, price bar, cards, table or chart.11 Live dollar, euro, gold, coin, USDT and crypto prices in Toman from Iran's free market — ticker, price bar, cards, table or chart widgets. 12 12 13 13 == Description == … … 47 47 48 48 The dashboard is in English and Persian (فارسی). Each widget has its own language, independent of the site language. A complete guide in both languages is under **EZRate › Help**. 49 50 = به فارسی = 51 52 افزونهٔ **ویجت قیمت ایزیریت** قیمت لحظهای دلار، یورو، درهم، لیر و بیش از ۲۰ ارز دیگر، قیمت طلای ۱۸ عیار و ۲۴ عیار، قیمت سکه امامی و بهار آزادی، انس طلا، قیمت تتر و بیتکوین را از بازار آزاد ایران به تومان در سایت وردپرسی شما نشان میدهد: زیرنویس متحرک قیمت، نوار قیمت بالای سایت، کارت و جدول قیمت ارز و طلا، و نمودار. بدون ثبتنام، بدون کلید API و بدون یک خط کدنویسی؛ همهٔ تنظیمات در پیشخوان وردپرس، با بلوک گوتنبرگ، ابزارک و شورتکد. 49 53 50 54 == External services == … … 87 91 Yes. Cached pages show the prices of the moment they were cached; most caching plugins refresh pages regularly. 88 92 93 = Does the plugin add links to my site? = 94 95 Not unless you allow it. After you create a widget the plugin asks once whether your widgets may show a small «Source: EZRate» link with its icon; you can also switch it (and links from each price to its chart page) on or off in **EZRate › Settings**. Both are off until you say yes. 96 89 97 = Can I show the prices in English? = 90 98 … … 110 118 111 119 == Changelog == 120 121 = 2.3.0 = 122 * New: optional «Source: EZRate» link with the EZRate icon in every widget type (ticker and price bar too), in the widget's language; asked once, off until you allow it. 123 * Better plugin name and description for search. 112 124 113 125 = 2.2.0 = -
ezrate-price-widgets/tags/2.3.0/uninstall.php
r3777366 r3778033 14 14 return; 15 15 } 16 foreach ( array( 'ezrpw_widgets', 'ezrpw_settings', 'ezrpw_last_data', 'ezrpw_status', 'ezrpw_welcome', 'ezrpw_welcome_shown', ' widget_ezrpw_widget' ) as $ezrpw_option ) {16 foreach ( array( 'ezrpw_widgets', 'ezrpw_settings', 'ezrpw_last_data', 'ezrpw_status', 'ezrpw_welcome', 'ezrpw_welcome_shown', 'ezrpw_credit_asked', 'widget_ezrpw_widget' ) as $ezrpw_option ) { 17 17 delete_option( $ezrpw_option ); 18 18 } -
ezrate-price-widgets/trunk/assets/css/ezrpw.css
r3777366 r3778033 98 98 /* footer */ 99 99 .ezrpw-ft { display: flex; justify-content: space-between; align-items: center; gap: .6em; padding: .4em 1em; border-top: 1px solid var(--ezrpw-border); font-size: .76em; color: var(--ezrpw-muted); flex-wrap: wrap; } 100 .ezrpw-credit { color: var(--ezrpw-accent) !important; font-weight: 600; } 100 .ezrpw-credit { display: inline-flex; align-items: center; gap: .4em; color: var(--ezrpw-muted) !important; font-weight: 500; text-decoration: none !important; white-space: nowrap; } 101 .ezrpw-credit img { width: 1.35em; height: 1.35em; border-radius: .3em; flex: none; margin: 0; box-shadow: none; } 102 .ezrpw-credit b { color: var(--ezrpw-accent); font-weight: 700; } 103 .ezrpw-credit:hover b { text-decoration: underline; } 104 /* ticker / price bar: the source at the end of the row */ 105 .ezrpw-t-ticker { display: flex; align-items: center; } 106 .ezrpw-t-ticker .ezrpw-track-wrap { flex: 1; min-width: 0; } 107 .ezrpw-src { flex: none; display: inline-flex; align-items: center; padding: 0 .9em; font-size: .78em; border-inline-start: 1px solid var(--ezrpw-border); align-self: stretch; } 101 108 /* placed automatically above / below the text of a post or page */ 102 109 .ezrpw-auto { margin: 0 0 1.5em; clear: both; } -
ezrate-price-widgets/trunk/blocks/widget/block.json
r3777366 r3778033 3 3 "apiVersion": 3, 4 4 "name": "ezrate-price-widgets/widget", 5 "version": "2. 2.0",5 "version": "2.3.0", 6 6 "title": "EZRate price widget", 7 7 "category": "widgets", -
ezrate-price-widgets/trunk/ezrate-price-widgets.php
r3777366 r3778033 1 1 <?php 2 2 /** 3 * Plugin Name: EZRate Price Widgets 3 * Plugin Name: EZRate Price Widgets – Live Dollar, Gold, Coin & Crypto Prices 4 4 * Plugin URI: https://ezrate.me/services/widgets/en 5 5 * Description: Live Iranian free-market rates (US dollar, euro, gold, coins, USDT and crypto) in Toman: ticker, price bar, cards, table and chart widgets. Shortcode, block and classic widget; every setting in your dashboard. 6 * Version: 2. 2.06 * Version: 2.3.0 7 7 * Requires at least: 6.3 8 8 * Requires PHP: 7.4 … … 20 20 } 21 21 22 define( 'EZRPW_VERSION', '2. 2.0' );22 define( 'EZRPW_VERSION', '2.3.0' ); 23 23 define( 'EZRPW_FILE', __FILE__ ); 24 24 define( 'EZRPW_DIR', plugin_dir_path( __FILE__ ) ); -
ezrate-price-widgets/trunk/includes/class-ezrpw-admin.php
r3777366 r3778033 69 69 add_action( 'admin_post_ezrpw_welcome_off', array( __CLASS__, 'welcome_off' ) ); 70 70 add_action( 'admin_notices', array( __CLASS__, 'welcome' ) ); 71 add_action( 'admin_notices', array( __CLASS__, 'credit_ask' ) ); 72 add_action( 'admin_post_ezrpw_credit', array( __CLASS__, 'credit_answer' ) ); 71 73 add_filter( 'plugin_action_links_' . plugin_basename( EZRPW_FILE ), array( __CLASS__, 'action_links' ) ); 72 74 } … … 571 573 <td> 572 574 <label><input type="checkbox" name="ezrpw_settings[link_rates]" value="1" <?php checked( $s['link_rates'] ); ?>> <?php esc_html_e( 'Link each price to its page on ezrate.me (chart and history)', 'ezrate-price-widgets' ); ?></label><br> 573 <label><input type="checkbox" name="ezrpw_settings[credit]" value="1" <?php checked( $s['credit'] ); ?>> <?php esc_html_e( 'Show a small « Rates by EZRate» link under cards, tables and charts— thank you, it keeps this plugin free', 'ezrate-price-widgets' ); ?></label>575 <label><input type="checkbox" name="ezrpw_settings[credit]" value="1" <?php checked( $s['credit'] ); ?>> <?php esc_html_e( 'Show a small «Source: EZRate» link (with its icon) in every widget — thank you, it keeps this plugin free', 'ezrate-price-widgets' ); ?></label> 574 576 <p class="description"><?php esc_html_e( 'Both are off by default: the plugin adds no links to your site unless you allow it.', 'ezrate-price-widgets' ); ?></p> 575 577 </td></tr> … … 699 701 700 702 /** 703 * Asks once (administrators, on the dashboard, Plugins and EZRate screens) whether the widgets may show the small 704 * «Source: EZRate» link. Nothing is added to the site unless the owner says yes; «No thanks» is never asked again. 705 */ 706 public static function credit_ask() { 707 if ( get_option( 'ezrpw_credit_asked' ) || get_option( 'ezrpw_welcome' ) || ! current_user_can( self::CAP ) || ! EZRPW_Widgets::all() ) { 708 return; 709 } 710 $s = EZRPW_Widgets::settings(); 711 if ( ! empty( $s['credit'] ) ) { 712 return; 713 } 714 $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null; 715 if ( $screen && ! in_array( $screen->id, array( 'dashboard', 'plugins' ), true ) && false === strpos( (string) $screen->id, 'ezrpw' ) ) { 716 return; 717 } 718 $url = function ( $do ) { 719 return wp_nonce_url( admin_url( 'admin-post.php?action=ezrpw_credit&do=' . $do ), 'ezrpw_credit' ); 720 }; 721 echo '<div class="notice notice-info"><p><strong>' . esc_html__( 'May your price widgets show a small «Source: EZRate» link?', 'ezrate-price-widgets' ) . '</strong> ' 722 . esc_html__( 'It names where the rates come from and helps keep this plugin and its data free. You can change this any time in EZRate › Settings.', 'ezrate-price-widgets' ) . '</p><p>' 723 . '<a class="button button-primary" href="' . esc_url( $url( 'on' ) ) . '">' . esc_html__( 'Yes, show the source', 'ezrate-price-widgets' ) . '</a> ' 724 . '<a class="button" href="' . esc_url( $url( 'off' ) ) . '">' . esc_html__( 'No thanks', 'ezrate-price-widgets' ) . '</a></p></div>'; 725 } 726 727 /** 728 * Answer of the «Source: EZRate» question. 729 */ 730 public static function credit_answer() { 731 self::guard( 'ezrpw_credit' ); 732 $do = isset( $_GET['do'] ) ? sanitize_key( wp_unslash( $_GET['do'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- checked by guard() above. 733 update_option( 'ezrpw_credit_asked', 1, false ); 734 if ( 'on' === $do ) { 735 $s = EZRPW_Widgets::settings(); 736 $s['credit'] = true; 737 update_option( EZRPW_Widgets::SETTINGS, $s ); 738 } 739 wp_safe_redirect( wp_get_referer() ? wp_get_referer() : admin_url( 'admin.php?page=ezrpw-widgets' ) ); 740 exit; 741 } 742 743 /** 701 744 * Dismiss the welcome notice. 702 745 */ -
ezrate-price-widgets/trunk/includes/class-ezrpw-format.php
r3777366 r3778033 37 37 'low' => 'کمترین', 38 38 'high' => 'بیشترین', 39 'credit' => 'قیمتها از', 39 'credit' => 'منبع:', 40 'brand' => 'ایزیریت', 40 41 'nodata' => 'قیمتها بهزودی نمایش داده میشود.', 41 42 ), … … 55 56 'low' => 'Low', 56 57 'high' => 'High', 57 'credit' => 'Rates by', 58 'credit' => 'Source:', 59 'brand' => 'EZRate', 58 60 'nodata' => 'Rates will appear shortly.', 59 61 ), … … 73 75 'low' => 'الأدنى', 74 76 'high' => 'الأعلى', 75 'credit' => 'الأسعار من', 77 'credit' => 'المصدر:', 78 'brand' => 'EZRate', 76 79 'nodata' => 'ستظهر الأسعار قريباً.', 77 80 ), … … 91 94 'low' => 'Мин.', 92 95 'high' => 'Макс.', 93 'credit' => 'Курсы от', 96 'credit' => 'Источник:', 97 'brand' => 'EZRate', 94 98 'nodata' => 'Курсы скоро появятся.', 95 99 ), … … 109 113 'low' => 'En düşük', 110 114 'high' => 'En yüksek', 111 'credit' => 'Kurlar:', 115 'credit' => 'Kaynak:', 116 'brand' => 'EZRate', 112 117 'nodata' => 'Kurlar birazdan görünecek.', 113 118 ), -
ezrate-price-widgets/trunk/includes/class-ezrpw-render.php
r3777366 r3778033 265 265 } 266 266 // the list twice: the animation slides by half its width and loops without a gap. 267 return '<div class="ezrpw-track-wrap"><div class="ezrpw-track">' . $items . '<span class="ezrpw-dup" aria-hidden="true">' . $items . '</span></div></div>'; 267 $credit = EZRPW_Widgets::settings()['credit'] ? '<span class="ezrpw-src">' . self::credit( $w['lang'], $data ) . '</span>' : ''; 268 return '<div class="ezrpw-track-wrap"><div class="ezrpw-track">' . $items . '<span class="ezrpw-dup" aria-hidden="true">' . $items . '</span></div></div>' . $credit; 268 269 } 269 270 … … 280 281 $items .= self::item( $r, $w, $data ); 281 282 } 282 return '<div class="ezrpw-row">' . $items . '</div>'; 283 $credit = EZRPW_Widgets::settings()['credit'] ? '<span class="ezrpw-src">' . self::credit( $w['lang'], $data ) . '</span>' : ''; 284 return '<div class="ezrpw-row">' . $items . $credit . '</div>'; 283 285 } 284 286 … … 422 424 $time = EZRPW_Format::date( $data['generated_at'], $lang, 'HH:mm' ); 423 425 $text = EZRPW_Format::t( $lang, 'updated' ) . ' ' . $time . ' - ' . EZRPW_Format::t( $lang, 'unit' ) . ': ' . EZRPW_Format::unit( $lang, isset( $w['cur'] ) ? $w['cur'] : 'irt' ); 424 $credit = $s['credit'] ? '<a class="ezrpw-credit" href="' . esc_url( untrailingslashit( $data['site'] ) . '/' . $lang ) . '" target="_blank" rel="noopener">' . esc_html( EZRPW_Format::t( $lang, 'credit' ) ) . ' EZRate</a>': '<span></span>';426 $credit = $s['credit'] ? self::credit( $lang, $data ) : '<span></span>'; 425 427 return '<div class="ezrpw-ft">' . $credit . '<span>' . esc_html( $text ) . '</span></div>'; 426 428 } 429 430 /** 431 * «Source: [icon] EZRate» — only when the site owner allowed it (Settings, or «Yes» on the notice); the icon comes first 432 * in the reading direction (right in Persian / Arabic, left in the others). 433 * 434 * @param string $lang Language. 435 * @param array $data Data. 436 * @return string 437 */ 438 public static function credit( $lang, $data ) { 439 $site = untrailingslashit( ! empty( $data['site'] ) ? $data['site'] : 'https://ezrate.me' ); 440 return '<a class="ezrpw-credit" href="' . esc_url( $site . '/' . $lang ) . '" target="_blank" rel="noopener">' 441 . '<img src="' . esc_url( EZRPW_URL . 'assets/img/icon-128.png' ) . '" alt="" width="16" height="16" loading="lazy" decoding="async">' 442 . '<span>' . esc_html( EZRPW_Format::t( $lang, 'credit' ) ) . ' <b>' . esc_html( EZRPW_Format::t( $lang, 'brand' ) ) . '</b></span></a>'; 443 } 427 444 } -
ezrate-price-widgets/trunk/readme.txt
r3777366 r3778033 1 === EZRate Price Widgets ===1 === EZRate Price Widgets – Live Dollar, Gold, Coin & Crypto Prices === 2 2 Contributors: aslanaria2000 3 Tags: currency, exchange rate, gold price, toman, ticker3 Tags: exchange rates, gold price, currency, crypto prices, toman 4 4 Requires at least: 6.3 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2. 2.07 Stable tag: 2.3.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Live Iranian free-market rates in Toman — US dollar, euro, gold, coins, USDT and crypto — as a ticker, price bar, cards, table or chart.11 Live dollar, euro, gold, coin, USDT and crypto prices in Toman from Iran's free market — ticker, price bar, cards, table or chart widgets. 12 12 13 13 == Description == … … 47 47 48 48 The dashboard is in English and Persian (فارسی). Each widget has its own language, independent of the site language. A complete guide in both languages is under **EZRate › Help**. 49 50 = به فارسی = 51 52 افزونهٔ **ویجت قیمت ایزیریت** قیمت لحظهای دلار، یورو، درهم، لیر و بیش از ۲۰ ارز دیگر، قیمت طلای ۱۸ عیار و ۲۴ عیار، قیمت سکه امامی و بهار آزادی، انس طلا، قیمت تتر و بیتکوین را از بازار آزاد ایران به تومان در سایت وردپرسی شما نشان میدهد: زیرنویس متحرک قیمت، نوار قیمت بالای سایت، کارت و جدول قیمت ارز و طلا، و نمودار. بدون ثبتنام، بدون کلید API و بدون یک خط کدنویسی؛ همهٔ تنظیمات در پیشخوان وردپرس، با بلوک گوتنبرگ، ابزارک و شورتکد. 49 53 50 54 == External services == … … 87 91 Yes. Cached pages show the prices of the moment they were cached; most caching plugins refresh pages regularly. 88 92 93 = Does the plugin add links to my site? = 94 95 Not unless you allow it. After you create a widget the plugin asks once whether your widgets may show a small «Source: EZRate» link with its icon; you can also switch it (and links from each price to its chart page) on or off in **EZRate › Settings**. Both are off until you say yes. 96 89 97 = Can I show the prices in English? = 90 98 … … 110 118 111 119 == Changelog == 120 121 = 2.3.0 = 122 * New: optional «Source: EZRate» link with the EZRate icon in every widget type (ticker and price bar too), in the widget's language; asked once, off until you allow it. 123 * Better plugin name and description for search. 112 124 113 125 = 2.2.0 = -
ezrate-price-widgets/trunk/uninstall.php
r3777366 r3778033 14 14 return; 15 15 } 16 foreach ( array( 'ezrpw_widgets', 'ezrpw_settings', 'ezrpw_last_data', 'ezrpw_status', 'ezrpw_welcome', 'ezrpw_welcome_shown', ' widget_ezrpw_widget' ) as $ezrpw_option ) {16 foreach ( array( 'ezrpw_widgets', 'ezrpw_settings', 'ezrpw_last_data', 'ezrpw_status', 'ezrpw_welcome', 'ezrpw_welcome_shown', 'ezrpw_credit_asked', 'widget_ezrpw_widget' ) as $ezrpw_option ) { 17 17 delete_option( $ezrpw_option ); 18 18 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)