Master Currency WP makes it very easy to create currency converter forms, list and single conversions with shortcodes. No programming skills are required to create these forms, lists and single
conversions. Focus has been that the user easily could add just any conversion of currencie(s) to his/her page without entering a single line of code, but at the same time offer real
good flexibility with a very well thought html-structure so any developer could easily apply his/her layout. The plugin is of course created with an objectoriented approach
so it's fairly easy to extend functionality. If you do miss some functionality, please tell in the support forum!
If you like the plugin, please consider donating.
This section describes how to install the plugin and get it working.
- Upload the plugin folder master-currency-wp to the `/wp-content/plugins/' directory, or install the plugin through the WordPress plugins screen directly.
- Activate the plugin through the 'Plugins' screen in WordPress
- Put shortcode(s) on the Wordpress post or page you want to display it on and add css to change layout for those.
Shortcodes
- [mcwp_updateddate] - shows the last updated date for the rates at the ECB (European Central Bank)
- [mcwp_currencyconverterform] - shows a converter form with amount, from currency (select from different currencies) and to currency (select from different currencies).
- [mcwp_currencylist] - shows a list of currency-pairs (eg. 1USD=x GBP, 1EUR = x USD etc)
- [mcwp_updateddate] has no attributes
- [mcwp_currencyconvert] shows single conversion(s) in post and/or page
[mcwp_currencyconverterform] attributes
- html_id - set id of this form
- input_type - text or number(number type = html5)
- default_amount - default amount to show when form is loaded. If there are several forms on the page/post, the last shortcode on the page/post sets the current default amount.
- amount_title - label that shows at the amount
- from_title -label that shows at the from currency-select-list
- to_title - Label that shows at the to currency-select-list
- calculatebutton_title - label of the button (that is used for calcuting the rate)
- show_currencydescription - if yes, description of the currency would be shown in the select-list (EUR - euro). If no then only the currency would be shown in the select-lists (EUR)
- currencies - if given, include list of currencies given (USD,EUR,GSP) in select-lists
- default_fromcurrency - if given use this currency as default from currency when loading post/page first time
- default_tocurrency - if given use this currency as default to currency when loading post/page first time
- use_ajax - if set to yes, display result without reloading post/page
- result_decimals -Set how many decimals to be displayed in the result of the conversion
- result_sanitize - Sanitize user input
- order_by - Order by currency or by currency description. (order_by = "currency" or order_by = "description")
Default values
- [mcwp_currencyconverterform html_id="{none}" input_type="text" default_amount="100" amount_title="Amount" from_title="From" to_title="To" result_title="Result" calculatebutton_title="Calculate" show_currencydescription="yes" currencies="{all currencies from ecb}" default_fromcurrency="EUR" default_tocurrency="USD" result_decimals="4" use_ajax="no" result_sanitize="yes" order_by="{no sorting}"]
[mcwp_currencylist] attributes
- html_id - create a (div)wrapper for the list and apply this id on the wrapper
- amount - shows what amount to convert between currencies (1EUR = x USD, can be changed to 15EUR = x USD)
- currencies - pair of what currencies that should be converted and displayed
- result_decimals - Set how many decimals to be displayed in the result of the conversion (for all listed currency pairs)
- separator - Include separator between each pair of currencies (eg. 1EUR= x USD1EUR = x SEK) etc
- order_by - Order by first currency, second currency or by result (order_by = "first_currency", order_by = "second_currency" or order_by = "result")
Default values
- [mcwp_currencylist html_id="{none}" amount="1" currencies="EUR-USD,USD-EUR,EUR-SEK,SEK-EUR,EUR-GBP,GBP-EUR" result_decimals="4" separator="{none}" order_by="{no sorting}"]
[mcwp_currencyconvert]
- html_id - apply id to the span-element
- amount - which amount to use for the conversion
- from - which currency to convert from (EUR, SEK etc)
- to - which currency to convert to (SEK, EUR etc)
- result_decimals -Set how many decimals to be displayed in the result of the conversion
- display_amount - yes/no (if no, just return the value of the conversion)
- display_type - Display type 1: eg. 300EUR=232.7850GBP or 2: eg. 300EUR(232.7850GBP)
Default values
- [mcwp_currencyconvert html_id="{none}" amount="1" from="EUR" to="USD" result_decimals="4" display_amount="yes" display_type="1"]
Example css
- .mcwp-convert-ecb {display:block;}
- .mcwp-convertequal {padding:0 4px;}
- .mcwp-result .mcwp-title {font-weight:bold;}
- .mcwp-result .mcwp-tocurrency {color:#5e92c4;font-weight:bold;}
- .mcwp-selectamount input, .mcwp-selectfromto select {display:block;padding:7px;}
- .mcwp-selectamount input {width:196px;}
- .mcwp-selectfromto {padding:1em 0;color:#5e92c4;}
- .mcwp-submit {padding:7px;width:212px;}
- .mcwp-submit:hover {cursor:pointer;background:#eeeeee;}