Created
April 23, 2013 13:46
-
-
Save stephenharris/5443675 to your computer and use it in GitHub Desktop.
The eventorganiser_get_currencies() function used in Event Organiser Pro to return details of the support currencies (human-readable name, symbol, HTML symbol).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Returns an array of available currencies. | |
| * | |
| * Applies the filter 'eventorganiser_currencies'. Returns an array of the form | |
| * | |
| * currency identifier => array( | |
| * 'name' => currency name, | |
| * 'symbol' => currency symbol, | |
| * 'symbol_html' => symbol in html | |
| * ) | |
| * | |
| * @since 1.0 | |
| * @uses filter eventorganiser_currencies to allow currencies to be added/removed/altered | |
| * @return array An array of available currencies | |
| */ | |
| function eventorganiser_get_currencies() { | |
| $currencies = array( | |
| 'USD' => array('name'=>'USD - U.S. Dollars', 'symbol'=>'$','symbol_html'=>'$'), | |
| 'GBP' => array('name'=>'GBP - British Pounds', 'symbol'=>'£','symbol_html'=>'£'), | |
| 'EUR' => array('name'=>'EUR - Euros', 'symbol'=>'€','symbol_html'=>'€'), | |
| 'AUD' => array('name'=>'AUD - Australian Dollars', 'symbol'=>'$','symbol_html'=>'$'), | |
| 'BRL' => array('name'=>'BRL - Brazilian Real', 'symbol'=>'R$','symbol_html'=>'R$'), | |
| 'CAD' => array('name'=>'CAD - Canadian Dollars', 'symbol'=>'$','symbol_html'=>'$'), | |
| 'CZK' => array('name'=>'CZK - Czech koruny', 'symbol'=>'Kč','symbol_html'=>''), | |
| 'DKK' => array('name'=>'DKK - Danish Kroner', 'symbol'=>'kr','symbol_html'=>'kr'), | |
| 'HKD' => array('name'=>'HKD - Hong Kong Dollars', 'symbol'=>'$','symbol_html'=>'$'), | |
| 'HUF' => array('name'=>'HUF - Hungarian Forints', 'symbol'=>'Ft','symbol_html'=>'Ft'), | |
| 'ILS' => array('name'=>'ILS - Israeli Shekels', 'symbol'=>'₪','symbol_html'=>'₪'), | |
| 'JPY' => array('name'=>'JPY - Japanese Yen', 'symbol'=>'¥','symbol_html'=>'¥'), | |
| 'MYR' => array('name'=>'MYR - Malaysian Ringgits', 'symbol'=>'RM','symbol_html'=>'RM'), | |
| 'MXN' => array('name'=>'MXN - Mexican Pesos', 'symbol'=>'$','symbol_html'=>'$'), | |
| 'NZD' => array('name'=>'NZD - New Zealand Dollars', 'symbol'=>'$','symbol_html'=>'$'), | |
| 'NOK' => array('name'=>'NOK - Norwegian Kroner', 'symbol'=>'kr','symbol_html'=>'kr'), | |
| 'PHP' => array('name'=>'PHP - Philippine Pesos', 'symbol'=>'Php','symbol_html'=>'Php'), | |
| 'PLN' => array('name'=>'PLN - Polish zloty', 'symbol'=>'zł','symbol_html'=>''), | |
| 'SGD' => array('name'=>'SGD - Singapore Dollars', 'symbol'=>'$','symbol_html'=>'$'), | |
| 'SEK' => array('name'=>'SEK - Swedish Kronor', 'symbol'=>'kr','symbol_html'=>'kr'), | |
| 'CHF' => array('name'=>'CHF - Swiss Francs', 'symbol'=>'CHF','symbol_html'=>'CHF'), | |
| 'TWD' => array('name'=>'TWD - Taiwan New Dollars', 'symbol'=>'$','symbol_html'=>'$'), | |
| 'THB' => array('name'=>'THB - Thai Baht', 'symbol'=>'฿','symbol_html'=>' ฿'), | |
| 'TRY' => array('name'=>'TRY - Turkish Liras', 'symbol'=>'TL','symbol_html'=>' ฿'), | |
| ); | |
| return apply_filters( 'eventorganiser_currencies', $currencies ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment