Created
March 29, 2015 09:08
-
-
Save gwin/27fd97253bc9b160b8ca to your computer and use it in GitHub Desktop.
Add new currency
This file contains 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 | |
// The code below you can paste in your theme functions.php or create | |
// new plugin and paste the code there. | |
add_filter("adverts_currency_list", "add_adverts_currency"); | |
/** | |
* Add new currency to the list | |
* | |
* @var $list Array list of currencies | |
* @return Array updated list of currencies | |
*/ | |
function add_adverts_currency($list) { | |
$list[] = array( | |
"code"=>"BWP", // ISO 4217 currency code, see http://en.wikipedia.org/wiki/ISO_4217 | |
"sign"=>"Pula", // currency prefix or postfix | |
"label"=>"Botswana pula" // currency long name | |
); | |
return $list | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment