开发者 | joostdekeijzer |
---|---|
更新时间 | 2024年3月29日 22:02 |
捐献地址: | 去捐款 |
PHP版本: | 7.0 及以上 |
WordPress版本: | 6.5 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
[currency]
shortcode you can convert one currency to another. The conversion is based on the rates published by the ECB. You can change from and to any of the supported currencies.
The [currency_legal]
shortcode outputs a disclaimer text and a link to the ECB eurofxref page.
Important!
ECB advices against using their rates for transaction purposes. From their site: "The reference rates are published for information purposes only. Using the rates for transaction purposes is strongly discouraged."
The reference rates are usually updated by ECB at around 16:00 CET every working day, except on TARGET closing days.
Go to the ECB site for more information and disclaimers.
Also note that conversion from non-Euro to non-Euro is done through the Euro, so GBP to USD is calculated as GBP → EUR → USD (converted 2 times).
This plugin is based on a plugin by Xclamation.
Also see wp_eurofxref on GitHub where development takes place.
The European Central Bank (ECB) daily publishes "foreign exchange reference rates" against more than 30 other currencies. These rates are used by this plugin. The rates are published for informational purposes only and exchange rates may vary. See the ECB site for more information.
When not showing the 'from' value the converted amount is wrapped with a <span> with css styling that is configurable using the 'to_style' attribute. Since v2.0 of the plugin additionaly the following classes are available to style using CSS:
[currency]
shortcode.[currency]
shortcode.[currency_legal]
shortcode.Since v2.0 the following filters are available:
[currency]
shortcode attributes.[currency_legal]
shortcode attributes.[currency_legal]
is called without attributes.no_from_show_rate
shortcode attribute for the [convert]
shortcode.shortcode_atts_{$shortcode}
filter for both shortcodes. Those filters become 'shortcode_atts_currency' and 'shortcode_atts_currency_legal'. Please see shortcode_atts_{$shortcode} reference for more information.eurofxref_currency_symbols
and eurofxref_number_formats
.woocommerce_currency_symbols
filter so if you have WooCommerce you don't need to use the eurofxref_currency_symbols
filter.